aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/inode.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 5c722ea21133..28a22092d450 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1709,21 +1709,18 @@ out:
1709 return rc; 1709 return rc;
1710} 1710}
1711 1711
1712int cifs_setattr(struct dentry *direntry, struct iattr *attrs) 1712static int
1713cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
1713{ 1714{
1714 int xid; 1715 int xid;
1715 struct inode *inode = direntry->d_inode; 1716 struct inode *inode = direntry->d_inode;
1716 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 1717 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1717 struct cifsTconInfo *pTcon = cifs_sb->tcon;
1718 struct cifsInodeInfo *cifsInode = CIFS_I(inode); 1718 struct cifsInodeInfo *cifsInode = CIFS_I(inode);
1719 char *full_path = NULL; 1719 char *full_path = NULL;
1720 int rc = -EACCES; 1720 int rc = -EACCES;
1721 __u32 dosattr = 0; 1721 __u32 dosattr = 0;
1722 __u64 mode = NO_CHANGE_64; 1722 __u64 mode = NO_CHANGE_64;
1723 1723
1724 if (pTcon->unix_ext)
1725 return cifs_setattr_unix(direntry, attrs);
1726
1727 xid = GetXid(); 1724 xid = GetXid();
1728 1725
1729 cFYI(1, ("setattr on file %s attrs->iavalid 0x%x", 1726 cFYI(1, ("setattr on file %s attrs->iavalid 0x%x",
@@ -1850,6 +1847,21 @@ cifs_setattr_exit:
1850 return rc; 1847 return rc;
1851} 1848}
1852 1849
1850int
1851cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1852{
1853 struct inode *inode = direntry->d_inode;
1854 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1855 struct cifsTconInfo *pTcon = cifs_sb->tcon;
1856
1857 if (pTcon->unix_ext)
1858 return cifs_setattr_unix(direntry, attrs);
1859
1860 return cifs_setattr_nounix(direntry, attrs);
1861
1862 /* BB: add cifs_setattr_legacy for really old servers */
1863}
1864
1853#if 0 1865#if 0
1854void cifs_delete_inode(struct inode *inode) 1866void cifs_delete_inode(struct inode *inode)
1855{ 1867{