lkml.org 
[lkml]   [2009]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] vfs: make real_lookup do dentry revalidation with i_mutex held
Keeping i_mutes over do_revalidate seem fine from a first glance, but
can you please do it without rearranging the whole code?

Something like the tiny untested patch below should archive the same
thing:


Index: linux-2.6/fs/namei.c
===================================================================
--- linux-2.6.orig/fs/namei.c 2009-03-17 09:15:53.430978739 +0100
+++ linux-2.6/fs/namei.c 2009-03-17 09:16:19.553981306 +0100
@@ -512,12 +512,12 @@ out_unlock:
* Uhhuh! Nasty case: the cache was re-populated while
* we waited on the semaphore. Need to revalidate.
*/
- mutex_unlock(&dir->i_mutex);
if (result->d_op && result->d_op->d_revalidate) {
result = do_revalidate(result, nd);
if (!result)
result = ERR_PTR(-ENOENT);
}
+ mutex_unlock(&dir->i_mutex);
return result;
}


\
 
 \ /
  Last update: 2009-03-17 09:21    [W:0.057 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site