diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-03 07:42:58 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-03 07:42:58 +0200 |
| commit | 35f4a629641b812e04fadef087da5d6af59e32d7 (patch) | |
| tree | 9cd5010ed6c0bf18cb631e60149a16ecccd9e0f3 /fs/attr.c | |
| parent | fc88bb11617978fb3fcfcc697fd5c9d2dae9c4a3 (diff) | |
| parent | 431c1646e1f86b949fa3685efc50b660a364c2b6 (diff) | |
Merge 6.11-rc6 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/attr.c')
| -rw-r--r-- | fs/attr.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/fs/attr.c b/fs/attr.c index 825007d5cda4..c04d19b58f12 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -487,9 +487,17 @@ int notify_change(struct mnt_idmap *idmap, struct dentry *dentry, error = security_inode_setattr(idmap, dentry, attr); if (error) return error; - error = try_break_deleg(inode, delegated_inode); - if (error) - return error; + + /* + * If ATTR_DELEG is set, then these attributes are being set on + * behalf of the holder of a write delegation. We want to avoid + * breaking the delegation in this case. + */ + if (!(ia_valid & ATTR_DELEG)) { + error = try_break_deleg(inode, delegated_inode); + if (error) + return error; + } if (inode->i_op->setattr) error = inode->i_op->setattr(idmap, dentry, attr); |
