ext4: fix quota charging for shared xattr blocks
authorTahsin Erdogan <tahsin@google.com>
Wed, 24 May 2017 22:24:07 +0000 (18:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 24 May 2017 22:24:07 +0000 (18:24 -0400)
commitb8cb5a545c3dd8b975aad19ea020eabe0a888e8d
tree922a559467f7a606bede9f9892731ec414ea9dc4
parentc41d342b39f15acbdc61948bab0cb3c567ec992a
ext4: fix quota charging for shared xattr blocks

ext4_xattr_block_set() calls dquot_alloc_block() to charge for an xattr
block when new references are made. However if dquot_initialize() hasn't
been called on an inode, request for charging is effectively ignored
because ext4_inode_info->i_dquot is not initialized yet.

Add dquot_initialize() to call paths that lead to ext4_xattr_block_set().

Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/ext4/acl.c
fs/ext4/super.c
fs/ext4/xattr.c
fs/quota/dquot.c
include/linux/quotaops.h