aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2025-03-28 13:19:18 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2025-03-28 16:38:02 -0400
commit8d3ca331026a7f9700d3747eed59a67b8f828cdc (patch)
treefa62349f988e7af70efce82517cec4effd27d87e /fs/nfs/inode.c
parentSUNRPC: Don't allow waiting for exiting tasks (diff)
downloadlinux-rng-8d3ca331026a7f9700d3747eed59a67b8f828cdc.tar.xz
linux-rng-8d3ca331026a7f9700d3747eed59a67b8f828cdc.zip
NFS: Don't allow waiting for exiting tasks
Once a task calls exit_signals() it can no longer be signalled. So do not allow it to do killable waits. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 1aa67fca69b2..119e447758b9 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -74,6 +74,8 @@ nfs_fattr_to_ino_t(struct nfs_fattr *fattr)
int nfs_wait_bit_killable(struct wait_bit_key *key, int mode)
{
+ if (unlikely(nfs_current_task_exiting()))
+ return -EINTR;
schedule();
if (signal_pending_state(mode, current))
return -ERESTARTSYS;