summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);