diff options
author | Ian Kent <raven@themaw.net> | 2008-07-24 00:30:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:31 -0400 |
commit | 5f6f4f28b6ba543beef8bad91aa6f69c7ffeee51 (patch) | |
tree | 72f3aac56d49c7bea7940f8d8b6e8ca559e3ae1c /fs/autofs4/autofs_i.h | |
parent | 391b52f98cf2e9bff227dad8bf9ea206fec43fa4 (diff) |
autofs4: don't make expiring dentry negative
Correct the error of making a positive dentry negative after it has been
instantiated.
The code that makes this error attempts to re-use the dentry from a
concurrent expire and mount to resolve a race and the dentry used for the
lookup must be negative for mounts to trigger in the required cases. The
fact is that the dentry doesn't need to be re-used because all that is
needed is to preserve the flag that indicates an expire is still
incomplete at the time of the mount request.
This change uses the the dentry to check the flag and wait for the expire
to complete then discards it instead of attempting to re-use it.
Signed-off-by: Ian Kent <raven@themaw.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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index c3d352d7fa93..69b1497b0029 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h | |||
@@ -52,7 +52,7 @@ struct autofs_info { | |||
52 | 52 | ||
53 | int flags; | 53 | int flags; |
54 | 54 | ||
55 | struct list_head rehash; | 55 | struct list_head expiring; |
56 | 56 | ||
57 | struct autofs_sb_info *sbi; | 57 | struct autofs_sb_info *sbi; |
58 | unsigned long last_used; | 58 | unsigned long last_used; |
@@ -112,8 +112,8 @@ struct autofs_sb_info { | |||
112 | struct mutex wq_mutex; | 112 | struct mutex wq_mutex; |
113 | spinlock_t fs_lock; | 113 | spinlock_t fs_lock; |
114 | struct autofs_wait_queue *queues; /* Wait queue pointer */ | 114 | struct autofs_wait_queue *queues; /* Wait queue pointer */ |
115 | spinlock_t rehash_lock; | 115 | spinlock_t lookup_lock; |
116 | struct list_head rehash_list; | 116 | struct list_head expiring_list; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static inline struct autofs_sb_info *autofs4_sbi(struct super_block *sb) | 119 | static inline struct autofs_sb_info *autofs4_sbi(struct super_block *sb) |