diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-08-02 07:26:12 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-08-06 18:39:46 -0400 |
commit | 0510eeb7367aca017c6320d04cfd9cbc3b5dd992 (patch) | |
tree | 4f05e9be032508707dcb29679d637902931533cc | |
parent | feb3e20cee25729447e1abdcb40c040b691d457a (diff) |
turn cifs_setattr into a multiplexor that calls the correct function
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r-- | fs/cifs/inode.c | 22 |
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 | ||
1712 | int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | 1712 | static int |
1713 | cifs_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 | ||
1850 | int | ||
1851 | cifs_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 |
1854 | void cifs_delete_inode(struct inode *inode) | 1866 | void cifs_delete_inode(struct inode *inode) |
1855 | { | 1867 | { |