summaryrefslogtreecommitdiffstats
path: root/fs/readdir.c
diff options
context:
space:
mode:
authorLiam R. Howlett <howlett@gmail.com>2007-12-06 17:39:54 -0500
committerMatthew Wilcox <willy@linux.intel.com>2007-12-06 17:39:54 -0500
commitda78451190bdaae0e67d6c96b1ec3366abc45474 (patch)
tree744e88aa523c52e7363577f8af266345490012dc /fs/readdir.c
parentad776537cc6b4b936cfd11893e7b698dfa072666 (diff)
downloadlinux-da78451190bdaae0e67d6c96b1ec3366abc45474.tar.gz
linux-da78451190bdaae0e67d6c96b1ec3366abc45474.tar.bz2
linux-da78451190bdaae0e67d6c96b1ec3366abc45474.zip
Use mutex_lock_killable in vfs_readdir
Signed-off-by: Liam R. Howlett <howlett@gmail.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Diffstat (limited to 'fs/readdir.c')
-rw-r--r--fs/readdir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/readdir.c b/fs/readdir.c
index efe52e676577..4e026e5407fb 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -30,7 +30,10 @@ int vfs_readdir(struct file *file, filldir_t filler, void *buf)
if (res)
goto out;
- mutex_lock(&inode->i_mutex);
+ res = mutex_lock_killable(&inode->i_mutex);
+ if (res)
+ goto out;
+
res = -ENOENT;
if (!IS_DEADDIR(inode)) {
res = file->f_op->readdir(file, buf, filler);