GFS2: Increase i_writecount during gfs2_setattr_chown
authorBob Peterson <rpeterso@redhat.com>
Mon, 6 Jan 2014 22:16:01 +0000 (17:16 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 7 Jan 2014 09:43:51 +0000 (09:43 +0000)
commit62e96cf81988101fe9e086b2877307b6adda5197
treed0a98b5e9ccc5ec6d42ec98f3a68dec2628ba8d3
parent2b47dad866d04f14c328f888ba5406057b8c7d33
GFS2: Increase i_writecount during gfs2_setattr_chown

This patch calls get_write_access in function gfs2_setattr_chown,
which merely increases inode->i_writecount for the duration of the
function. That will ensure that any file closes won't delete the
inode's multi-block reservation while the function is running.
It also ensures that a multi-block reservation exists when needed
for quota change operations during the chown.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/inode.c