mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 15:03:53 +02:00
fs/open: make do_truncate() killable
Allows killing processes that are waiting for the inode lock. Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Link: https://lore.kernel.org/20250513150327.1373061-3-max.kellermann@ionos.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
28a3f6ab2f
commit
d686875642
|
@ -60,7 +60,10 @@ int do_truncate(struct mnt_idmap *idmap, struct dentry *dentry,
|
|||
if (ret)
|
||||
newattrs.ia_valid |= ret | ATTR_FORCE;
|
||||
|
||||
inode_lock(dentry->d_inode);
|
||||
ret = inode_lock_killable(dentry->d_inode);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Note any delegations or leases have already been broken: */
|
||||
ret = notify_change(idmap, dentry, &newattrs, NULL);
|
||||
inode_unlock(dentry->d_inode);
|
||||
|
|
Loading…
Reference in New Issue
Block a user