@@ -35,10 +35,10 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
struct inode *inode = filep->f_dentry->d_inode;
int rc = -ENOTTY; /* strange error - but the precedent */
int xid;
- struct cifs_sb_info *cifs_sb;
+ struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
#ifdef CONFIG_CIFS_POSIX
struct cifsFileInfo *pSMBFile = filep->private_data;
- struct cifsTconInfo *tcon = tlink_tcon(pSMBFile->tlink);
+ struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb);
__u64 ExtAttrBits = 0;
__u64 ExtAttrMask = 0;
__u64 caps = le64_to_cpu(tcon->fsUnixInfo.Capability);
@@ -48,8 +48,6 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
cFYI(1, "ioctl file %p cmd %u arg %lu", filep, command, arg);
- cifs_sb = CIFS_SB(inode->i_sb);
-
switch (command) {
case CIFS_IOC_CHECKUMOUNT:
cFYI(1, "User unmount attempted");