summaryrefslogtreecommitdiffstats
path: root/fs/readdir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-05-26 00:05:12 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-26 00:13:25 -0400
commit002354112f1e3cc7400ef48b853aefb90e801588 (patch)
tree42bc0b17b008fc65b359a06e6f991b5247e10705 /fs/readdir.c
parent887bddfa90c79957d61067cd54a10087be0c8b23 (diff)
downloadlinux-002354112f1e3cc7400ef48b853aefb90e801588.tar.bz2
restore killability of old mutex_lock_killable(&inode->i_mutex) users
The ones that are taking it exclusive, that is... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/readdir.c')
-rw-r--r--fs/readdir.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/readdir.c b/fs/readdir.c
index 68ef06efe6bc..9d0212c374d6 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -35,13 +35,13 @@ int iterate_dir(struct file *file, struct dir_context *ctx)
if (res)
goto out;
- if (shared)
+ if (shared) {
inode_lock_shared(inode);
- else
- inode_lock(inode);
- // res = mutex_lock_killable(&inode->i_mutex);
- // if (res)
- // goto out;
+ } else {
+ res = down_write_killable(&inode->i_rwsem);
+ if (res)
+ goto out;
+ }
res = -ENOENT;
if (!IS_DEADDIR(inode)) {