]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/cifs/ioctl.c
cifs: fix CIFS_ENUMERATE_SNAPSHOTS oops
[mirror_ubuntu-zesty-kernel.git] / fs / cifs / ioctl.c
index 9f51b81119f2b204361f25d86dcfd350a8917700..b52b7ffa6d343114e9a5325a3f0edd215223561c 100644 (file)
@@ -189,7 +189,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
        xid = get_xid();
 
        cifs_sb = CIFS_SB(inode->i_sb);
-       cifs_dbg(VFS, "cifs ioctl 0x%x\n", command);
+       cifs_dbg(FYI, "cifs ioctl 0x%x\n", command);
        switch (command) {
                case FS_IOC_GETFLAGS:
                        if (pSMBFile == NULL)
@@ -268,6 +268,8 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
                        rc = smb_mnt_get_fsinfo(xid, tcon, (void __user *)arg);
                        break;
                case CIFS_ENUMERATE_SNAPSHOTS:
+                       if (pSMBFile == NULL)
+                               break;
                        if (arg == 0) {
                                rc = -EINVAL;
                                goto cifs_ioc_exit;