diff options
Diffstat (limited to 'fs/autofs4/autofs_i.h')
-rw-r--r-- | fs/autofs4/autofs_i.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index c3d352d7fa93..69a2f5c92319 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h | |||
@@ -52,7 +52,10 @@ struct autofs_info { | |||
52 | 52 | ||
53 | int flags; | 53 | int flags; |
54 | 54 | ||
55 | struct list_head rehash; | 55 | struct completion expire_complete; |
56 | |||
57 | struct list_head active; | ||
58 | struct list_head expiring; | ||
56 | 59 | ||
57 | struct autofs_sb_info *sbi; | 60 | struct autofs_sb_info *sbi; |
58 | unsigned long last_used; | 61 | unsigned long last_used; |
@@ -68,15 +71,14 @@ struct autofs_info { | |||
68 | }; | 71 | }; |
69 | 72 | ||
70 | #define AUTOFS_INF_EXPIRING (1<<0) /* dentry is in the process of expiring */ | 73 | #define AUTOFS_INF_EXPIRING (1<<0) /* dentry is in the process of expiring */ |
74 | #define AUTOFS_INF_MOUNTPOINT (1<<1) /* mountpoint status for direct expire */ | ||
71 | 75 | ||
72 | struct autofs_wait_queue { | 76 | struct autofs_wait_queue { |
73 | wait_queue_head_t queue; | 77 | wait_queue_head_t queue; |
74 | struct autofs_wait_queue *next; | 78 | struct autofs_wait_queue *next; |
75 | autofs_wqt_t wait_queue_token; | 79 | autofs_wqt_t wait_queue_token; |
76 | /* We use the following to see what we are waiting for */ | 80 | /* We use the following to see what we are waiting for */ |
77 | unsigned int hash; | 81 | struct qstr name; |
78 | unsigned int len; | ||
79 | char *name; | ||
80 | u32 dev; | 82 | u32 dev; |
81 | u64 ino; | 83 | u64 ino; |
82 | uid_t uid; | 84 | uid_t uid; |
@@ -85,7 +87,7 @@ struct autofs_wait_queue { | |||
85 | pid_t tgid; | 87 | pid_t tgid; |
86 | /* This is for status reporting upon return */ | 88 | /* This is for status reporting upon return */ |
87 | int status; | 89 | int status; |
88 | atomic_t wait_ctr; | 90 | unsigned int wait_ctr; |
89 | }; | 91 | }; |
90 | 92 | ||
91 | #define AUTOFS_SBI_MAGIC 0x6d4a556d | 93 | #define AUTOFS_SBI_MAGIC 0x6d4a556d |
@@ -112,8 +114,9 @@ struct autofs_sb_info { | |||
112 | struct mutex wq_mutex; | 114 | struct mutex wq_mutex; |
113 | spinlock_t fs_lock; | 115 | spinlock_t fs_lock; |
114 | struct autofs_wait_queue *queues; /* Wait queue pointer */ | 116 | struct autofs_wait_queue *queues; /* Wait queue pointer */ |
115 | spinlock_t rehash_lock; | 117 | spinlock_t lookup_lock; |
116 | struct list_head rehash_list; | 118 | struct list_head active_list; |
119 | struct list_head expiring_list; | ||
117 | }; | 120 | }; |
118 | 121 | ||
119 | static inline struct autofs_sb_info *autofs4_sbi(struct super_block *sb) | 122 | static inline struct autofs_sb_info *autofs4_sbi(struct super_block *sb) |
@@ -138,18 +141,14 @@ static inline int autofs4_oz_mode(struct autofs_sb_info *sbi) { | |||
138 | static inline int autofs4_ispending(struct dentry *dentry) | 141 | static inline int autofs4_ispending(struct dentry *dentry) |
139 | { | 142 | { |
140 | struct autofs_info *inf = autofs4_dentry_ino(dentry); | 143 | struct autofs_info *inf = autofs4_dentry_ino(dentry); |
141 | int pending = 0; | ||
142 | 144 | ||
143 | if (dentry->d_flags & DCACHE_AUTOFS_PENDING) | 145 | if (dentry->d_flags & DCACHE_AUTOFS_PENDING) |
144 | return 1; | 146 | return 1; |
145 | 147 | ||
146 | if (inf) { | 148 | if (inf->flags & AUTOFS_INF_EXPIRING) |
147 | spin_lock(&inf->sbi->fs_lock); | 149 | return 1; |
148 | pending = inf->flags & AUTOFS_INF_EXPIRING; | ||
149 | spin_unlock(&inf->sbi->fs_lock); | ||
150 | } | ||
151 | 150 | ||
152 | return pending; | 151 | return 0; |
153 | } | 152 | } |
154 | 153 | ||
155 | static inline void autofs4_copy_atime(struct file *src, struct file *dst) | 154 | static inline void autofs4_copy_atime(struct file *src, struct file *dst) |
@@ -164,6 +163,7 @@ void autofs4_free_ino(struct autofs_info *); | |||
164 | 163 | ||
165 | /* Expiration */ | 164 | /* Expiration */ |
166 | int is_autofs4_dentry(struct dentry *); | 165 | int is_autofs4_dentry(struct dentry *); |
166 | int autofs4_expire_wait(struct dentry *dentry); | ||
167 | int autofs4_expire_run(struct super_block *, struct vfsmount *, | 167 | int autofs4_expire_run(struct super_block *, struct vfsmount *, |
168 | struct autofs_sb_info *, | 168 | struct autofs_sb_info *, |
169 | struct autofs_packet_expire __user *); | 169 | struct autofs_packet_expire __user *); |