]> asedeno.scripts.mit.edu Git - linux.git/commit
GFS2: Use inode_newsize_ok and get_write_access in fallocate
authorAndrew Price <anprice@redhat.com>
Wed, 12 Nov 2014 17:24:03 +0000 (17:24 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 14 Nov 2014 14:14:30 +0000 (14:14 +0000)
commit9c9f1159a54c6163dd0b9d2085985d3c98dad11f
treed65c967f3dc7d604a73b020ed80a13839c6548b9
parent1a8550332a7f0111306b6b34e44a7c696ef68c4d
GFS2: Use inode_newsize_ok and get_write_access in fallocate

gfs2_fallocate wasn't checking inode_newsize_ok nor get_write_access.
Split out the context setup and inode locking pieces into a separate
function to make it more clear and add these missing calls.

inode_newsize_ok is called conditional on FALLOC_FL_KEEP_SIZE as there
is no need to enforce a file size limit if it isn't going to change.

Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/file.c