autofs: change catatonic setting to a bit flag
[linux-2.6-block.git] / fs / autofs / root.c
index 782e57b911abcf0cd1d7aae2095333554e1f1d74..164ccd3402cf3d4e4a94c53dcb947bbd4c8f04e3 100644 (file)
@@ -510,7 +510,8 @@ static struct dentry *autofs_lookup(struct inode *dir,
        sbi = autofs_sbi(dir->i_sb);
 
        pr_debug("pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d\n",
-                current->pid, task_pgrp_nr(current), sbi->catatonic,
+                current->pid, task_pgrp_nr(current),
+                sbi->flags & AUTOFS_SBI_CATATONIC,
                 autofs_oz_mode(sbi));
 
        active = autofs_lookup_active(dentry);
@@ -563,7 +564,7 @@ static int autofs_dir_symlink(struct inode *dir,
         * autofs mount is catatonic but the state of an autofs
         * file system needs to be preserved over restarts.
         */
-       if (sbi->catatonic)
+       if (sbi->flags & AUTOFS_SBI_CATATONIC)
                return -EACCES;
 
        BUG_ON(!ino);
@@ -626,7 +627,7 @@ static int autofs_dir_unlink(struct inode *dir, struct dentry *dentry)
         * autofs mount is catatonic but the state of an autofs
         * file system needs to be preserved over restarts.
         */
-       if (sbi->catatonic)
+       if (sbi->flags & AUTOFS_SBI_CATATONIC)
                return -EACCES;
 
        if (atomic_dec_and_test(&ino->count)) {
@@ -714,7 +715,7 @@ static int autofs_dir_rmdir(struct inode *dir, struct dentry *dentry)
         * autofs mount is catatonic but the state of an autofs
         * file system needs to be preserved over restarts.
         */
-       if (sbi->catatonic)
+       if (sbi->flags & AUTOFS_SBI_CATATONIC)
                return -EACCES;
 
        spin_lock(&sbi->lookup_lock);
@@ -759,7 +760,7 @@ static int autofs_dir_mkdir(struct inode *dir,
         * autofs mount is catatonic but the state of an autofs
         * file system needs to be preserved over restarts.
         */
-       if (sbi->catatonic)
+       if (sbi->flags & AUTOFS_SBI_CATATONIC)
                return -EACCES;
 
        pr_debug("dentry %p, creating %pd\n", dentry, dentry);