CIFS: Add SMB2 support for unlink
[linux-block.git] / fs / cifs / smb2inode.c
index 2aa5cb08c526a3461ea759ea6f09b8abb65686b9..02a9bda4248c289a98ac46a1a4a94e581ebf3d42 100644 (file)
@@ -161,3 +161,12 @@ smb2_rmdir(const unsigned int xid, struct cifs_tcon *tcon, const char *name,
                                  0, CREATE_NOT_FILE | CREATE_DELETE_ON_CLOSE,
                                  NULL, SMB2_OP_DELETE);
 }
+
+int
+smb2_unlink(const unsigned int xid, struct cifs_tcon *tcon, const char *name,
+           struct cifs_sb_info *cifs_sb)
+{
+       return smb2_open_op_close(xid, tcon, cifs_sb, name, DELETE, FILE_OPEN,
+                                 0, CREATE_DELETE_ON_CLOSE, NULL,
+                                 SMB2_OP_DELETE);
+}