* [Patch 2/2] Kernel: mutex_lock_killable
@ 2007-11-28 13:56 Liam R. Howlett
0 siblings, 0 replies; only message in thread
From: Liam R. Howlett @ 2007-11-28 13:56 UTC (permalink / raw)
To: linux-kernel; +Cc: willy, akpm, mingo
Use mutex_lock_killable in vfs_readdir
Signed-off-by: Liam R. Howlett <howlett@gmail.com>
Acked-by: Matthew Wilcox <willy@linux.intel.com>
---
fs/readdir.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/readdir.c b/fs/readdir.c
index efe52e6..4aee2c9 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 = -EINTR;
+ if (mutex_lock_killable(&inode->i_mutex))
+ goto out;
+
res = -ENOENT;
if (!IS_DEADDIR(inode)) {
res = file->f_op->readdir(file, buf, filler);
--
1.5.2.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-28 13:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-28 13:56 [Patch 2/2] Kernel: mutex_lock_killable Liam R. Howlett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®