diff options
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 15 |
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) { |