fs: __file_remove_privs(): restore call to inode_has_no_xattr()
PATCH 1/1 fs: __file_remove_privs(): restore call to inode_has_no_xattr()
This restores the call to inode_has_no_xattr() in the function __file_remove_privs(). In case the dentry_meeds_remove_privs() returned 0, the function inode_has_no_xattr() was not called.
--- fs/inode.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
fs/inode.c +8 -6
@@ -2018,23 +2018,25 @@ static int __file_remove_privs(struct file *file, unsigned int flags) {struct dentry *dentry =file_dentry (file);struct inode *inode =file_inode (file); -int error; +int error =0 ;int kill;if (IS_NOSEC (inode) || !S_ISREG (inode->i_mode))return 0 ; kill =dentry_needs_remove_privs (dentry); -if (kill <=0 ) +if (kill <0 )return kill; -if (flags &IOCB_NOWAIT ) -return -EAGAIN ; +if (kill) { +if (flags &IOCB_NOWAIT ) +return -EAGAIN ; + + error =__remove_privs (file_mnt_user_ns (file), dentry, kill); + } - error =__remove_privs (file_mnt_user_ns (file), dentry, kill);if (!error)inode_has_no_xattr (inode); -return error; }
Signature · 1 line
2.30.2
Quoted 3 lines · Stefan Roesch
This restores the call to
inode_has_no_xattr()in the function__file_remove_privs(). In case thedentry_meeds_remove_privs()returned 0, the functioninode_has_no_xattr()was not called.
Should add a:
to this commit message.
Signature · 1 line
Jens Axboe
Quoted 6 lines · Stefan Roesch
This restores the call to
inode_has_no_xattr()in the function__file_remove_privs(). In case thedentry_meeds_remove_privs()returned 0, the functioninode_has_no_xattr()was not called.Signed-off-by Stefan Roesch <[email protected]>---
Looks good to me. As Jens said, this should get a fixes tag and should probably also have a link to the perf regression I debugged this on so that we can see whether this was actually the cause,
Quoted 5 lines · Christian Brauner
Quoted 4 lines · Stefan Roesch
This restores the call to
inode_has_no_xattr()in the function__file_remove_privs(). In case thedentry_meeds_remove_privs()returned 0, the functioninode_has_no_xattr()was not called.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Stefan Roesch <[email protected]>---
Looks good to me. As Jens said, this should get a fixes tag and should probably also have a link to the perf regression I debugged this on so that we can see whether this was actually the cause,
Yes good point, this is a case where the Link actually makes a lot of sense.
Signature · 1 line
Jens Axboe