diff options
Diffstat (limited to 'fs/autofs4/autofs_i.h')
-rw-r--r-- | fs/autofs4/autofs_i.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index f5a52c871726..c7b2b8890188 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h | |||
@@ -84,6 +84,7 @@ struct autofs_wait_queue { | |||
84 | char *name; | 84 | char *name; |
85 | /* This is for status reporting upon return */ | 85 | /* This is for status reporting upon return */ |
86 | int status; | 86 | int status; |
87 | atomic_t notified; | ||
87 | atomic_t wait_ctr; | 88 | atomic_t wait_ctr; |
88 | }; | 89 | }; |
89 | 90 | ||
@@ -101,6 +102,7 @@ struct autofs_sb_info { | |||
101 | int needs_reghost; | 102 | int needs_reghost; |
102 | struct super_block *sb; | 103 | struct super_block *sb; |
103 | struct semaphore wq_sem; | 104 | struct semaphore wq_sem; |
105 | spinlock_t fs_lock; | ||
104 | struct autofs_wait_queue *queues; /* Wait queue pointer */ | 106 | struct autofs_wait_queue *queues; /* Wait queue pointer */ |
105 | }; | 107 | }; |
106 | 108 | ||
@@ -126,9 +128,18 @@ static inline int autofs4_oz_mode(struct autofs_sb_info *sbi) { | |||
126 | static inline int autofs4_ispending(struct dentry *dentry) | 128 | static inline int autofs4_ispending(struct dentry *dentry) |
127 | { | 129 | { |
128 | struct autofs_info *inf = autofs4_dentry_ino(dentry); | 130 | struct autofs_info *inf = autofs4_dentry_ino(dentry); |
131 | int pending = 0; | ||
129 | 132 | ||
130 | return (dentry->d_flags & DCACHE_AUTOFS_PENDING) || | 133 | if (dentry->d_flags & DCACHE_AUTOFS_PENDING) |
131 | (inf != NULL && inf->flags & AUTOFS_INF_EXPIRING); | 134 | return 1; |
135 | |||
136 | if (inf) { | ||
137 | spin_lock(&inf->sbi->fs_lock); | ||
138 | pending = inf->flags & AUTOFS_INF_EXPIRING; | ||
139 | spin_unlock(&inf->sbi->fs_lock); | ||
140 | } | ||
141 | |||
142 | return pending; | ||
132 | } | 143 | } |
133 | 144 | ||
134 | static inline void autofs4_copy_atime(struct file *src, struct file *dst) | 145 | static inline void autofs4_copy_atime(struct file *src, struct file *dst) |