summaryrefslogtreecommitdiff
path: root/fs/ext4/sysfs.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-12-31 12:04:38 -0600
committerTheodore Ts'o <tytso@mit.edu>2020-01-17 16:24:54 -0500
commit9b02e4987ab092caed8f3bccdacaef9acf9015dd (patch)
tree7b28f65ccfc3d875ff086079e13370332c6120d8 /fs/ext4/sysfs.c
parentdd6683e6efad2339894575da46bc519646e37c24 (diff)
ext4: clean up len and offset checks in ext4_fallocate()
- Fix some comments. - Consistently access i_size directly rather than using i_size_read(), since in all relevant cases we're under inode_lock(). - Simplify the alignment checks by using the IS_ALIGNED() macro. - In ext4_insert_range(), do the check against s_maxbytes in a way that is safe against signed overflow. (This doesn't currently matter for ext4 due to ext4's limited max file size, but this is something other filesystems have gotten wrong. We might as well do it safely.) Signed-off-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20191231180444.46586-3-ebiggers@kernel.org Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com> Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/sysfs.c')
0 files changed, 0 insertions, 0 deletions