diff options
author | Ian Kent <raven@themaw.net> | 2009-12-15 19:45:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:19:58 -0500 |
commit | 213614d583748d00967a91cacd656f417efb36ce (patch) | |
tree | f24b85cb8192af7f6723f3886fba3da55ccfbe0d /fs/autofs4/autofs_i.h | |
parent | cb4b492ac7595aad10756fe0b04691f0965e0cfc (diff) |
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.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index 3d283abf67d..0118d67221b 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h | |||
@@ -60,6 +60,11 @@ do { \ | |||
60 | current->pid, __func__, ##args); \ | 60 | current->pid, __func__, ##args); \ |
61 | } while (0) | 61 | } while (0) |
62 | 62 | ||
63 | struct rehash_entry { | ||
64 | struct task_struct *task; | ||
65 | struct list_head list; | ||
66 | }; | ||
67 | |||
63 | /* Unified info structure. This is pointed to by both the dentry and | 68 | /* Unified info structure. This is pointed to by both the dentry and |
64 | inode structures. Each file in the filesystem has an instance of this | 69 | inode structures. Each file in the filesystem has an instance of this |
65 | structure. It holds a reference to the dentry, so dentries are never | 70 | structure. It holds a reference to the dentry, so dentries are never |
@@ -76,6 +81,7 @@ struct autofs_info { | |||
76 | 81 | ||
77 | struct list_head active; | 82 | struct list_head active; |
78 | int active_count; | 83 | int active_count; |
84 | struct list_head rehash_list; | ||
79 | 85 | ||
80 | struct list_head expiring; | 86 | struct list_head expiring; |
81 | 87 | ||
@@ -98,6 +104,7 @@ struct autofs_info { | |||
98 | #define AUTOFS_INF_EXPIRING (1<<0) /* dentry is in the process of expiring */ | 104 | #define AUTOFS_INF_EXPIRING (1<<0) /* dentry is in the process of expiring */ |
99 | #define AUTOFS_INF_MOUNTPOINT (1<<1) /* mountpoint status for direct expire */ | 105 | #define AUTOFS_INF_MOUNTPOINT (1<<1) /* mountpoint status for direct expire */ |
100 | #define AUTOFS_INF_PENDING (1<<2) /* dentry pending mount */ | 106 | #define AUTOFS_INF_PENDING (1<<2) /* dentry pending mount */ |
107 | #define AUTOFS_INF_REHASH (1<<3) /* dentry in transit to ->lookup() */ | ||
101 | 108 | ||
102 | struct autofs_wait_queue { | 109 | struct autofs_wait_queue { |
103 | wait_queue_head_t queue; | 110 | wait_queue_head_t queue; |