* [PATCH] fs/namespace: waiting for mutex in lock_mount() is "killable"
@ 2011-12-02 5:56 Max Kellermann
0 siblings, 0 replies; only message in thread
From: Max Kellermann @ 2011-12-02 5:56 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel; +Cc: max
Allow killing the process while it's indirectly waiting for the NFS
server's response.
---
fs/namespace.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index e5e1c7d..9560bec 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1651,8 +1651,13 @@ static int attach_recursive_mnt(struct vfsmount *source_mnt,
static int lock_mount(struct path *path)
{
struct vfsmount *mnt;
+ int err;
+
retry:
- mutex_lock(&path->dentry->d_inode->i_mutex);
+ err = mutex_lock_killable(&path->dentry->d_inode->i_mutex);
+ if (unlikely(err))
+ return err;
+
if (unlikely(cant_mount(path->dentry))) {
mutex_unlock(&path->dentry->d_inode->i_mutex);
return -ENOENT;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-12-02 5:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 5:56 [PATCH] fs/namespace: waiting for mutex in lock_mount() is "killable" Max Kellermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).