Loading fs/cifs/smb2inode.c +13 −9 Original line number Original line Diff line number Diff line Loading @@ -105,6 +105,12 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon, smb2_set_next_command(server, &rqst[num_rqst]); smb2_set_next_command(server, &rqst[num_rqst]); smb2_set_related(&rqst[num_rqst++]); smb2_set_related(&rqst[num_rqst++]); break; break; case SMB2_OP_MKDIR: /* * Directories are created through parameters in the * SMB2_open() call. */ break; default: default: cifs_dbg(VFS, "Invalid command\n"); cifs_dbg(VFS, "Invalid command\n"); rc = -EINVAL; rc = -EINVAL; Loading Loading @@ -142,6 +148,10 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon, if (rqst[2].rq_iov) if (rqst[2].rq_iov) SMB2_close_free(&rqst[2]); SMB2_close_free(&rqst[2]); break; break; case SMB2_OP_MKDIR: if (rqst[1].rq_iov) SMB2_close_free(&rqst[1]); break; } } free_rsp_buf(resp_buftype[0], rsp_iov[0].iov_base); free_rsp_buf(resp_buftype[0], rsp_iov[0].iov_base); free_rsp_buf(resp_buftype[1], rsp_iov[1].iov_base); free_rsp_buf(resp_buftype[1], rsp_iov[1].iov_base); Loading Loading @@ -194,12 +204,6 @@ smb2_open_op_close(const unsigned int xid, struct cifs_tcon *tcon, switch (command) { switch (command) { case SMB2_OP_DELETE: case SMB2_OP_DELETE: break; break; case SMB2_OP_MKDIR: /* * Directories are created through parameters in the * SMB2_open() call. */ break; case SMB2_OP_RMDIR: case SMB2_OP_RMDIR: tmprc = SMB2_rmdir(xid, tcon, fid.persistent_fid, tmprc = SMB2_rmdir(xid, tcon, fid.persistent_fid, fid.volatile_fid); fid.volatile_fid); Loading Loading @@ -287,7 +291,7 @@ int smb2_mkdir(const unsigned int xid, struct cifs_tcon *tcon, const char *name, smb2_mkdir(const unsigned int xid, struct cifs_tcon *tcon, const char *name, struct cifs_sb_info *cifs_sb) struct cifs_sb_info *cifs_sb) { { return smb2_open_op_close(xid, tcon, cifs_sb, name, return smb2_compound_op(xid, tcon, cifs_sb, name, FILE_WRITE_ATTRIBUTES, FILE_CREATE, FILE_WRITE_ATTRIBUTES, FILE_CREATE, CREATE_NOT_FILE, NULL, SMB2_OP_MKDIR); CREATE_NOT_FILE, NULL, SMB2_OP_MKDIR); } } Loading Loading
fs/cifs/smb2inode.c +13 −9 Original line number Original line Diff line number Diff line Loading @@ -105,6 +105,12 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon, smb2_set_next_command(server, &rqst[num_rqst]); smb2_set_next_command(server, &rqst[num_rqst]); smb2_set_related(&rqst[num_rqst++]); smb2_set_related(&rqst[num_rqst++]); break; break; case SMB2_OP_MKDIR: /* * Directories are created through parameters in the * SMB2_open() call. */ break; default: default: cifs_dbg(VFS, "Invalid command\n"); cifs_dbg(VFS, "Invalid command\n"); rc = -EINVAL; rc = -EINVAL; Loading Loading @@ -142,6 +148,10 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon, if (rqst[2].rq_iov) if (rqst[2].rq_iov) SMB2_close_free(&rqst[2]); SMB2_close_free(&rqst[2]); break; break; case SMB2_OP_MKDIR: if (rqst[1].rq_iov) SMB2_close_free(&rqst[1]); break; } } free_rsp_buf(resp_buftype[0], rsp_iov[0].iov_base); free_rsp_buf(resp_buftype[0], rsp_iov[0].iov_base); free_rsp_buf(resp_buftype[1], rsp_iov[1].iov_base); free_rsp_buf(resp_buftype[1], rsp_iov[1].iov_base); Loading Loading @@ -194,12 +204,6 @@ smb2_open_op_close(const unsigned int xid, struct cifs_tcon *tcon, switch (command) { switch (command) { case SMB2_OP_DELETE: case SMB2_OP_DELETE: break; break; case SMB2_OP_MKDIR: /* * Directories are created through parameters in the * SMB2_open() call. */ break; case SMB2_OP_RMDIR: case SMB2_OP_RMDIR: tmprc = SMB2_rmdir(xid, tcon, fid.persistent_fid, tmprc = SMB2_rmdir(xid, tcon, fid.persistent_fid, fid.volatile_fid); fid.volatile_fid); Loading Loading @@ -287,7 +291,7 @@ int smb2_mkdir(const unsigned int xid, struct cifs_tcon *tcon, const char *name, smb2_mkdir(const unsigned int xid, struct cifs_tcon *tcon, const char *name, struct cifs_sb_info *cifs_sb) struct cifs_sb_info *cifs_sb) { { return smb2_open_op_close(xid, tcon, cifs_sb, name, return smb2_compound_op(xid, tcon, cifs_sb, name, FILE_WRITE_ATTRIBUTES, FILE_CREATE, FILE_WRITE_ATTRIBUTES, FILE_CREATE, CREATE_NOT_FILE, NULL, SMB2_OP_MKDIR); CREATE_NOT_FILE, NULL, SMB2_OP_MKDIR); } } Loading