diff options
author | Tahsin Erdogan <tahsin@google.com> | 2017-06-21 22:28:40 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-06-21 22:28:40 -0400 |
commit | c1a5d5f6ab21eb7e6ff8cb99489d9001cf2a2850 (patch) | |
tree | fdbc1f98ca505dc3b85bbef2a0aefb0b764c56d8 /fs/ext4/xattr.h | |
parent | 65d3000520c50f3c160403a210a7504d789eafca (diff) |
ext4: improve journal credit handling in set xattr paths
Both ext4_set_acl() and ext4_set_context() need to be made aware of
ea_inode feature when it comes to credits calculation.
Also add a sufficient credits check in ext4_xattr_set_handle() right
after xattr write lock is grabbed. Original credits calculation is done
outside the lock so there is a possiblity that the initially calculated
credits are not sufficient anymore.
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/xattr.h')
-rw-r--r-- | fs/ext4/xattr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h index b6ef99d1a061..e82c5fe36a26 100644 --- a/fs/ext4/xattr.h +++ b/fs/ext4/xattr.h @@ -160,6 +160,7 @@ extern ssize_t ext4_listxattr(struct dentry *, char *, size_t); extern int ext4_xattr_get(struct inode *, int, const char *, void *, size_t); extern int ext4_xattr_set(struct inode *, int, const char *, const void *, size_t, int); extern int ext4_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int); +extern int ext4_xattr_set_credits(struct inode *inode, size_t value_len); extern int ext4_xattr_inode_unlink(struct inode *inode, unsigned long ea_ino); extern int ext4_xattr_delete_inode(handle_t *handle, struct inode *inode, |