aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/autofs_i.h
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2009-12-15 16:45:51 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 07:19:58 -0800
commit213614d583748d00967a91cacd656f417efb36ce (patch)
treef24b85cb8192af7f6723f3886fba3da55ccfbe0d /fs/autofs4/autofs_i.h
parentcb4b492ac7595aad10756fe0b04691f0965e0cfc (diff)
downloadkernel_samsung_espresso10-213614d583748d00967a91cacd656f417efb36ce.zip
kernel_samsung_espresso10-213614d583748d00967a91cacd656f417efb36ce.tar.gz
kernel_samsung_espresso10-213614d583748d00967a91cacd656f417efb36ce.tar.bz2
autofs4: always use lookup for lookup
We need to be able to cope with the directory mutex being held during ->d_revalidate() in some cases, but not all cases, and not necessarily by us. Because we need to release the mutex when we call back to the daemon to do perform a mount we must be sure that it is us who holds the mutex so we must redirect mount requests to ->lookup() if the mutex is held. Signed-off-by: Ian Kent <raven@themaw.net> Cc: Sage Weil <sage@newdream.net> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Andreas Dilger <adilger@sun.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Yehuda Saheh <yehuda@newdream.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/autofs4/autofs_i.h')
-rw-r--r--fs/autofs4/autofs_i.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index 3d283ab..0118d67 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -60,6 +60,11 @@ do { \
current->pid, __func__, ##args); \
} while (0)
+struct rehash_entry {
+ struct task_struct *task;
+ struct list_head list;
+};
+
/* Unified info structure. This is pointed to by both the dentry and
inode structures. Each file in the filesystem has an instance of this
structure. It holds a reference to the dentry, so dentries are never
@@ -76,6 +81,7 @@ struct autofs_info {
struct list_head active;
int active_count;
+ struct list_head rehash_list;
struct list_head expiring;
@@ -98,6 +104,7 @@ struct autofs_info {
#define AUTOFS_INF_EXPIRING (1<<0) /* dentry is in the process of expiring */
#define AUTOFS_INF_MOUNTPOINT (1<<1) /* mountpoint status for direct expire */
#define AUTOFS_INF_PENDING (1<<2) /* dentry pending mount */
+#define AUTOFS_INF_REHASH (1<<3) /* dentry in transit to ->lookup() */
struct autofs_wait_queue {
wait_queue_head_t queue;