diff options
Diffstat (limited to 'fs/cifs/ioctl.c')
-rw-r--r-- | fs/cifs/ioctl.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index 9d38a71c8e14..cc70a61a47d2 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c | |||
@@ -37,11 +37,11 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) | |||
37 | int xid; | 37 | int xid; |
38 | struct cifs_sb_info *cifs_sb; | 38 | struct cifs_sb_info *cifs_sb; |
39 | #ifdef CONFIG_CIFS_POSIX | 39 | #ifdef CONFIG_CIFS_POSIX |
40 | struct cifsFileInfo *pSMBFile = filep->private_data; | ||
41 | struct cifsTconInfo *tcon = pSMBFile->tcon; | ||
40 | __u64 ExtAttrBits = 0; | 42 | __u64 ExtAttrBits = 0; |
41 | __u64 ExtAttrMask = 0; | 43 | __u64 ExtAttrMask = 0; |
42 | __u64 caps; | 44 | __u64 caps = le64_to_cpu(tcon->fsUnixInfo.Capability); |
43 | struct cifsTconInfo *tcon; | ||
44 | struct cifsFileInfo *pSMBFile = filep->private_data; | ||
45 | #endif /* CONFIG_CIFS_POSIX */ | 45 | #endif /* CONFIG_CIFS_POSIX */ |
46 | 46 | ||
47 | xid = GetXid(); | 47 | xid = GetXid(); |
@@ -50,17 +50,6 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) | |||
50 | 50 | ||
51 | cifs_sb = CIFS_SB(inode->i_sb); | 51 | cifs_sb = CIFS_SB(inode->i_sb); |
52 | 52 | ||
53 | #ifdef CONFIG_CIFS_POSIX | ||
54 | tcon = cifs_sb->tcon; | ||
55 | if (tcon) | ||
56 | caps = le64_to_cpu(tcon->fsUnixInfo.Capability); | ||
57 | else { | ||
58 | rc = -EIO; | ||
59 | FreeXid(xid); | ||
60 | return -EIO; | ||
61 | } | ||
62 | #endif /* CONFIG_CIFS_POSIX */ | ||
63 | |||
64 | switch (command) { | 53 | switch (command) { |
65 | case CIFS_IOC_CHECKUMOUNT: | 54 | case CIFS_IOC_CHECKUMOUNT: |
66 | cFYI(1, "User unmount attempted"); | 55 | cFYI(1, "User unmount attempted"); |