diff options
author | Ian Kent <raven@themaw.net> | 2019-01-03 18:27:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-04 16:13:47 -0500 |
commit | 9d8719a42e4671cfe27733d82b5a071295ab9975 (patch) | |
tree | 5c55fd383d1277bd91a806045d4ba64ff4d111eb /fs/autofs/root.c | |
parent | 9bf964c9cee40285808ce973be7a266876404501 (diff) |
autofs: change catatonic setting to a bit flag
Change the superblock info. catatonic setting to be part of a flags bit
field.
Link: http://lkml.kernel.org/r/154296973142.9889.17275721668508589639.stgit@pluto-themaw-net
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/autofs/root.c')
-rw-r--r-- | fs/autofs/root.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/autofs/root.c b/fs/autofs/root.c index 782e57b911ab..164ccd3402cf 100644 --- a/fs/autofs/root.c +++ b/fs/autofs/root.c | |||
@@ -510,7 +510,8 @@ static struct dentry *autofs_lookup(struct inode *dir, | |||
510 | sbi = autofs_sbi(dir->i_sb); | 510 | sbi = autofs_sbi(dir->i_sb); |
511 | 511 | ||
512 | pr_debug("pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d\n", | 512 | pr_debug("pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d\n", |
513 | current->pid, task_pgrp_nr(current), sbi->catatonic, | 513 | current->pid, task_pgrp_nr(current), |
514 | sbi->flags & AUTOFS_SBI_CATATONIC, | ||
514 | autofs_oz_mode(sbi)); | 515 | autofs_oz_mode(sbi)); |
515 | 516 | ||
516 | active = autofs_lookup_active(dentry); | 517 | active = autofs_lookup_active(dentry); |
@@ -563,7 +564,7 @@ static int autofs_dir_symlink(struct inode *dir, | |||
563 | * autofs mount is catatonic but the state of an autofs | 564 | * autofs mount is catatonic but the state of an autofs |
564 | * file system needs to be preserved over restarts. | 565 | * file system needs to be preserved over restarts. |
565 | */ | 566 | */ |
566 | if (sbi->catatonic) | 567 | if (sbi->flags & AUTOFS_SBI_CATATONIC) |
567 | return -EACCES; | 568 | return -EACCES; |
568 | 569 | ||
569 | BUG_ON(!ino); | 570 | BUG_ON(!ino); |
@@ -626,7 +627,7 @@ static int autofs_dir_unlink(struct inode *dir, struct dentry *dentry) | |||
626 | * autofs mount is catatonic but the state of an autofs | 627 | * autofs mount is catatonic but the state of an autofs |
627 | * file system needs to be preserved over restarts. | 628 | * file system needs to be preserved over restarts. |
628 | */ | 629 | */ |
629 | if (sbi->catatonic) | 630 | if (sbi->flags & AUTOFS_SBI_CATATONIC) |
630 | return -EACCES; | 631 | return -EACCES; |
631 | 632 | ||
632 | if (atomic_dec_and_test(&ino->count)) { | 633 | if (atomic_dec_and_test(&ino->count)) { |
@@ -714,7 +715,7 @@ static int autofs_dir_rmdir(struct inode *dir, struct dentry *dentry) | |||
714 | * autofs mount is catatonic but the state of an autofs | 715 | * autofs mount is catatonic but the state of an autofs |
715 | * file system needs to be preserved over restarts. | 716 | * file system needs to be preserved over restarts. |
716 | */ | 717 | */ |
717 | if (sbi->catatonic) | 718 | if (sbi->flags & AUTOFS_SBI_CATATONIC) |
718 | return -EACCES; | 719 | return -EACCES; |
719 | 720 | ||
720 | spin_lock(&sbi->lookup_lock); | 721 | spin_lock(&sbi->lookup_lock); |
@@ -759,7 +760,7 @@ static int autofs_dir_mkdir(struct inode *dir, | |||
759 | * autofs mount is catatonic but the state of an autofs | 760 | * autofs mount is catatonic but the state of an autofs |
760 | * file system needs to be preserved over restarts. | 761 | * file system needs to be preserved over restarts. |
761 | */ | 762 | */ |
762 | if (sbi->catatonic) | 763 | if (sbi->flags & AUTOFS_SBI_CATATONIC) |
763 | return -EACCES; | 764 | return -EACCES; |
764 | 765 | ||
765 | pr_debug("dentry %p, creating %pd\n", dentry, dentry); | 766 | pr_debug("dentry %p, creating %pd\n", dentry, dentry); |