aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-07-10 08:14:18 -0400
committerSteve French <smfrench@gmail.com>2012-07-27 16:17:47 -0400
commitf958ca5d88e6071767b10549d544b3475dfb6996 (patch)
tree4e64f85c54c287b98740936b27a96b27cac4e110 /fs/cifs/inode.c
parenta0e731839dd461eee0fe2dc026e0965e961e2730 (diff)
CIFS: Move rmdir code to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index d7e74b1268cb..7354877fa3bd 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1426,7 +1426,8 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
1426 unsigned int xid; 1426 unsigned int xid;
1427 struct cifs_sb_info *cifs_sb; 1427 struct cifs_sb_info *cifs_sb;
1428 struct tcon_link *tlink; 1428 struct tcon_link *tlink;
1429 struct cifs_tcon *pTcon; 1429 struct cifs_tcon *tcon;
1430 struct TCP_Server_Info *server;
1430 char *full_path = NULL; 1431 char *full_path = NULL;
1431 struct cifsInodeInfo *cifsInode; 1432 struct cifsInodeInfo *cifsInode;
1432 1433
@@ -1446,10 +1447,16 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
1446 rc = PTR_ERR(tlink); 1447 rc = PTR_ERR(tlink);
1447 goto rmdir_exit; 1448 goto rmdir_exit;
1448 } 1449 }
1449 pTcon = tlink_tcon(tlink); 1450 tcon = tlink_tcon(tlink);
1451 server = tcon->ses->server;
1452
1453 if (!server->ops->rmdir) {
1454 rc = -ENOSYS;
1455 cifs_put_tlink(tlink);
1456 goto rmdir_exit;
1457 }
1450 1458
1451 rc = CIFSSMBRmDir(xid, pTcon, full_path, cifs_sb->local_nls, 1459 rc = server->ops->rmdir(xid, tcon, full_path, cifs_sb);
1452 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
1453 cifs_put_tlink(tlink); 1460 cifs_put_tlink(tlink);
1454 1461
1455 if (!rc) { 1462 if (!rc) {