summaryrefslogtreecommitdiffstats
path: root/fs/readdir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-05-26 06:05:12 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-26 06:13:25 +0200
commit002354112f1e3cc7400ef48b853aefb90e801588 (patch)
tree42bc0b17b008fc65b359a06e6f991b5247e10705 /fs/readdir.c
parentadd down_write_killable_nested() (diff)
downloadlinux-002354112f1e3cc7400ef48b853aefb90e801588.tar.xz
linux-002354112f1e3cc7400ef48b853aefb90e801588.zip
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)) {