quota: unify quota init condition in setattr
authorDmitry Monakhov <dmonakhov@openvz.org>
Thu, 8 Apr 2010 18:04:20 +0000 (22:04 +0400)
committerJan Kara <jack@suse.cz>
Fri, 21 May 2010 17:30:45 +0000 (19:30 +0200)
commit12755627bdcddcdb30a1bfb9a09395a52b1d6838
treeb2d69696975d5457648020324f683a45302fbf3c
parentfcbc59f96e38a0999e827be9d04d46b62b53b20a
quota: unify quota init condition in setattr

Quota must being initialized if size or uid/git changes requested.
But initialization performed in two different places:
in case of i_size file system is responsible for dquot init
, but in case of uid/gid init will be called internally in
dquot_transfer().
This ambiguity makes code harder to understand.
Let's move this logic to one common helper function.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext2/inode.c
fs/ext3/inode.c
fs/ext4/inode.c
fs/jfs/file.c
fs/ocfs2/file.c
fs/quota/dquot.c
fs/reiserfs/inode.c
fs/udf/file.c
fs/ufs/truncate.c
include/linux/quotaops.h