ext4: improve journal credit handling in set xattr paths
authorTahsin Erdogan <tahsin@google.com>
Thu, 22 Jun 2017 02:28:40 +0000 (22:28 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 22 Jun 2017 02:28:40 +0000 (22:28 -0400)
commitc1a5d5f6ab21eb7e6ff8cb99489d9001cf2a2850
treefdbc1f98ca505dc3b85bbef2a0aefb0b764c56d8
parent65d3000520c50f3c160403a210a7504d789eafca
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>
fs/ext4/acl.c
fs/ext4/ext4_jbd2.h
fs/ext4/super.c
fs/ext4/xattr.c
fs/ext4/xattr.h