Skip to content

Commit

Permalink
Use mutex_lock_killable in vfs_readdir
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liam R. Howlett authored and Matthew Wilcox committed Dec 6, 2007
1 parent ad77653 commit da78451
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit da78451

Please sign in to comment.