summaryrefslogtreecommitdiffstats
path: root/fs/autofs4/autofs_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/autofs_i.h')
-rw-r--r--fs/autofs4/autofs_i.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index f5a52c87172..c7b2b889018 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -84,6 +84,7 @@ struct autofs_wait_queue {
char *name;
/* This is for status reporting upon return */
int status;
+ atomic_t notified;
atomic_t wait_ctr;
};
@@ -101,6 +102,7 @@ struct autofs_sb_info {
int needs_reghost;
struct super_block *sb;
struct semaphore wq_sem;
+ spinlock_t fs_lock;
struct autofs_wait_queue *queues; /* Wait queue pointer */
};
@@ -126,9 +128,18 @@ static inline int autofs4_oz_mode(struct autofs_sb_info *sbi) {
static inline int autofs4_ispending(struct dentry *dentry)
{
struct autofs_info *inf = autofs4_dentry_ino(dentry);
+ int pending = 0;
- return (dentry->d_flags & DCACHE_AUTOFS_PENDING) ||
- (inf != NULL && inf->flags & AUTOFS_INF_EXPIRING);
+ if (dentry->d_flags & DCACHE_AUTOFS_PENDING)
+ return 1;
+
+ if (inf) {
+ spin_lock(&inf->sbi->fs_lock);
+ pending = inf->flags & AUTOFS_INF_EXPIRING;
+ spin_unlock(&inf->sbi->fs_lock);
+ }
+
+ return pending;
}
static inline void autofs4_copy_atime(struct file *src, struct file *dst)