mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 15:03:53 +02:00
fs/read_write: make default_llseek() 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-4-max.kellermann@ionos.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
d686875642
commit
2e1a8fbff5
|
@ -332,7 +332,9 @@ loff_t default_llseek(struct file *file, loff_t offset, int whence)
|
|||
struct inode *inode = file_inode(file);
|
||||
loff_t retval;
|
||||
|
||||
inode_lock(inode);
|
||||
retval = inode_lock_killable(inode);
|
||||
if (retval)
|
||||
return retval;
|
||||
switch (whence) {
|
||||
case SEEK_END:
|
||||
offset += i_size_read(inode);
|
||||
|
|
Loading…
Reference in New Issue
Block a user