diff options
Diffstat (limited to 'fs/autofs4/autofs_i.h')
-rw-r--r-- | fs/autofs4/autofs_i.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index f3cf151a59e3..fe9fc235ee75 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h | |||
@@ -266,5 +266,31 @@ out: | |||
266 | return ret; | 266 | return ret; |
267 | } | 267 | } |
268 | 268 | ||
269 | static inline void autofs4_add_expiring(struct dentry *dentry) | ||
270 | { | ||
271 | struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); | ||
272 | struct autofs_info *ino = autofs4_dentry_ino(dentry); | ||
273 | if (ino) { | ||
274 | spin_lock(&sbi->lookup_lock); | ||
275 | if (list_empty(&ino->expiring)) | ||
276 | list_add(&ino->expiring, &sbi->expiring_list); | ||
277 | spin_unlock(&sbi->lookup_lock); | ||
278 | } | ||
279 | return; | ||
280 | } | ||
281 | |||
282 | static inline void autofs4_del_expiring(struct dentry *dentry) | ||
283 | { | ||
284 | struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); | ||
285 | struct autofs_info *ino = autofs4_dentry_ino(dentry); | ||
286 | if (ino) { | ||
287 | spin_lock(&sbi->lookup_lock); | ||
288 | if (!list_empty(&ino->expiring)) | ||
289 | list_del_init(&ino->expiring); | ||
290 | spin_unlock(&sbi->lookup_lock); | ||
291 | } | ||
292 | return; | ||
293 | } | ||
294 | |||
269 | void autofs4_dentry_release(struct dentry *); | 295 | void autofs4_dentry_release(struct dentry *); |
270 | extern void autofs4_kill_sb(struct super_block *); | 296 | extern void autofs4_kill_sb(struct super_block *); |