vfs: live vfsmounts never have NULL ->mnt_sb
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 9 Dec 2011 04:01:06 +0000 (23:01 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 4 Jan 2012 03:52:42 +0000 (22:52 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/usb/core/inode.c
fs/configfs/dir.c

index 0a4613df6c30fb1923a1bc7a230b0d32ab9e5a21..783fde7f44c856cde880a1ab3f1b15753581734b 100644 (file)
@@ -264,7 +264,7 @@ static int remount(struct super_block *sb, int *flags, char *data)
                return -EINVAL;
        }
 
-       if (usbfs_mount && usbfs_mount->mnt_sb)
+       if (usbfs_mount)
                update_sb(usbfs_mount->mnt_sb);
 
        return 0;
@@ -500,9 +500,8 @@ static int fs_create_by_name (const char *name, mode_t mode,
         * have around.
         */
        if (!parent ) {
-               if (usbfs_mount && usbfs_mount->mnt_sb) {
+               if (usbfs_mount)
                        parent = usbfs_mount->mnt_root;
-               }
        }
 
        if (!parent) {
index 36b1d7aadba1499baf345e3ffdb7dffafc188110..1c52969111041fe0731a1645faf9e15bea5a36e5 100644 (file)
@@ -311,7 +311,7 @@ static int configfs_create_dir(struct config_item * item, struct dentry *dentry)
 
        if (item->ci_parent)
                parent = item->ci_parent->ci_dentry;
-       else if (configfs_mount && configfs_mount->mnt_sb)
+       else if (configfs_mount)
                parent = configfs_mount->mnt_root;
        else
                return -EFAULT;