Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647594
| From | Tahsin Erdogan <tahsin@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] ext4: fix quota charging for shared xattr blocks |
| Date | 2017-05-23 05:10 +0200 |
| Message-ID | <tK8mR-5Uk-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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() call to ext4_xattr_set_handle(). Signed-off-by: Tahsin Erdogan <tahsin@google.com> --- fs/ext4/xattr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 8fb7ce14e6eb..e94575448550 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -1166,6 +1166,11 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, return -EINVAL; if (strlen(name) > 255) return -ERANGE; + + error = dquot_initialize(inode); + if (error) + return error; + ext4_write_lock_xattr(inode, &no_expand); error = ext4_reserve_inode_write(handle, inode, &is.iloc); -- 2.13.0.219.gdb65acc882-goog
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] ext4: fix quota charging for shared xattr blocks Tahsin Erdogan <tahsin@google.com> - 2017-05-23 05:10 +0200
Re: [PATCH] ext4: fix quota charging for shared xattr blocks Jan Kara <jack@suse.cz> - 2017-05-23 10:20 +0200
[PATCH v2] ext4: fix quota charging for shared xattr blocks Tahsin Erdogan <tahsin@google.com> - 2017-05-24 01:10 +0200
Re: [PATCH v2] ext4: fix quota charging for shared xattr blocks Jan Kara <jack@suse.cz> - 2017-05-24 11:10 +0200
[PATCH v3] ext4: fix quota charging for shared xattr blocks Tahsin Erdogan <tahsin@google.com> - 2017-05-24 13:40 +0200
csiph-web