mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
ad776537cc
commit
da78451190
|
@ -30,7 +30,10 @@ int vfs_readdir(struct file *file, filldir_t filler, void *buf)
|
||||||
if (res)
|
if (res)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
mutex_lock(&inode->i_mutex);
|
res = mutex_lock_killable(&inode->i_mutex);
|
||||||
|
if (res)
|
||||||
|
goto out;
|
||||||
|
|
||||||
res = -ENOENT;
|
res = -ENOENT;
|
||||||
if (!IS_DEADDIR(inode)) {
|
if (!IS_DEADDIR(inode)) {
|
||||||
res = file->f_op->readdir(file, buf, filler);
|
res = file->f_op->readdir(file, buf, filler);
|
||||||
|
|
Loading…
Reference in New Issue