Skip to content

Commit 2e1a8fb

Browse files
MaxKellermannbrauner
authored andcommitted
fs/read_write: make default_llseek() killable
Allows killing processes that are waiting for the inode lock. Signed-off-by: Max Kellermann <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent d686875 commit 2e1a8fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/read_write.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ loff_t default_llseek(struct file *file, loff_t offset, int whence)
332332
struct inode *inode = file_inode(file);
333333
loff_t retval;
334334

335-
inode_lock(inode);
335+
retval = inode_lock_killable(inode);
336+
if (retval)
337+
return retval;
336338
switch (whence) {
337339
case SEEK_END:
338340
offset += i_size_read(inode);

0 commit comments

Comments
 (0)