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)
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

diff --cc fs/gfs2/file.c
Simple merge