diff options
Diffstat (limited to 'fs/autofs/root.c')
-rw-r--r-- | fs/autofs/root.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/autofs/root.c b/fs/autofs/root.c index 782e57b911ab..1246f396bf0e 100644 --- a/fs/autofs/root.c +++ b/fs/autofs/root.c | |||
@@ -275,8 +275,11 @@ static int autofs_mount_wait(const struct path *path, bool rcu_walk) | |||
275 | pr_debug("waiting for mount name=%pd\n", path->dentry); | 275 | pr_debug("waiting for mount name=%pd\n", path->dentry); |
276 | status = autofs_wait(sbi, path, NFY_MOUNT); | 276 | status = autofs_wait(sbi, path, NFY_MOUNT); |
277 | pr_debug("mount wait done status=%d\n", status); | 277 | pr_debug("mount wait done status=%d\n", status); |
278 | ino->last_used = jiffies; | ||
279 | return status; | ||
278 | } | 280 | } |
279 | ino->last_used = jiffies; | 281 | if (!(sbi->flags & AUTOFS_SBI_STRICTEXPIRE)) |
282 | ino->last_used = jiffies; | ||
280 | return status; | 283 | return status; |
281 | } | 284 | } |
282 | 285 | ||
@@ -510,7 +513,8 @@ static struct dentry *autofs_lookup(struct inode *dir, | |||
510 | sbi = autofs_sbi(dir->i_sb); | 513 | sbi = autofs_sbi(dir->i_sb); |
511 | 514 | ||
512 | pr_debug("pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d\n", | 515 | pr_debug("pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d\n", |
513 | current->pid, task_pgrp_nr(current), sbi->catatonic, | 516 | current->pid, task_pgrp_nr(current), |
517 | sbi->flags & AUTOFS_SBI_CATATONIC, | ||
514 | autofs_oz_mode(sbi)); | 518 | autofs_oz_mode(sbi)); |
515 | 519 | ||
516 | active = autofs_lookup_active(dentry); | 520 | active = autofs_lookup_active(dentry); |
@@ -563,7 +567,7 @@ static int autofs_dir_symlink(struct inode *dir, | |||
563 | * autofs mount is catatonic but the state of an autofs | 567 | * autofs mount is catatonic but the state of an autofs |
564 | * file system needs to be preserved over restarts. | 568 | * file system needs to be preserved over restarts. |
565 | */ | 569 | */ |
566 | if (sbi->catatonic) | 570 | if (sbi->flags & AUTOFS_SBI_CATATONIC) |
567 | return -EACCES; | 571 | return -EACCES; |
568 | 572 | ||
569 | BUG_ON(!ino); | 573 | BUG_ON(!ino); |
@@ -626,7 +630,7 @@ static int autofs_dir_unlink(struct inode *dir, struct dentry *dentry) | |||
626 | * autofs mount is catatonic but the state of an autofs | 630 | * autofs mount is catatonic but the state of an autofs |
627 | * file system needs to be preserved over restarts. | 631 | * file system needs to be preserved over restarts. |
628 | */ | 632 | */ |
629 | if (sbi->catatonic) | 633 | if (sbi->flags & AUTOFS_SBI_CATATONIC) |
630 | return -EACCES; | 634 | return -EACCES; |
631 | 635 | ||
632 | if (atomic_dec_and_test(&ino->count)) { | 636 | if (atomic_dec_and_test(&ino->count)) { |
@@ -714,7 +718,7 @@ static int autofs_dir_rmdir(struct inode *dir, struct dentry *dentry) | |||
714 | * autofs mount is catatonic but the state of an autofs | 718 | * autofs mount is catatonic but the state of an autofs |
715 | * file system needs to be preserved over restarts. | 719 | * file system needs to be preserved over restarts. |
716 | */ | 720 | */ |
717 | if (sbi->catatonic) | 721 | if (sbi->flags & AUTOFS_SBI_CATATONIC) |
718 | return -EACCES; | 722 | return -EACCES; |
719 | 723 | ||
720 | spin_lock(&sbi->lookup_lock); | 724 | spin_lock(&sbi->lookup_lock); |
@@ -759,7 +763,7 @@ static int autofs_dir_mkdir(struct inode *dir, | |||
759 | * autofs mount is catatonic but the state of an autofs | 763 | * autofs mount is catatonic but the state of an autofs |
760 | * file system needs to be preserved over restarts. | 764 | * file system needs to be preserved over restarts. |
761 | */ | 765 | */ |
762 | if (sbi->catatonic) | 766 | if (sbi->flags & AUTOFS_SBI_CATATONIC) |
763 | return -EACCES; | 767 | return -EACCES; |
764 | 768 | ||
765 | pr_debug("dentry %p, creating %pd\n", dentry, dentry); | 769 | pr_debug("dentry %p, creating %pd\n", dentry, dentry); |