blob: 25f057c587ea63473388e69f1b4d7217b473a049 [file] [log] [blame]
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +04001/*
2 * fs/cifs/smb2inode.c
3 *
4 * Copyright (C) International Business Machines Corp., 2002, 2011
5 * Etersoft, 2012
6 * Author(s): Pavel Shilovsky (pshilovsky@samba.org),
7 * Steve French (sfrench@us.ibm.com)
8 *
9 * This library is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published
11 * by the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
17 * the GNU Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23#include <linux/fs.h>
24#include <linux/stat.h>
25#include <linux/slab.h>
26#include <linux/pagemap.h>
27#include <asm/div64.h>
28#include "cifsfs.h"
29#include "cifspdu.h"
30#include "cifsglob.h"
31#include "cifsproto.h"
32#include "cifs_debug.h"
33#include "cifs_fs_sb.h"
34#include "cifs_unicode.h"
35#include "fscache.h"
36#include "smb2glob.h"
37#include "smb2pdu.h"
38#include "smb2proto.h"
39
40static int
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +100041smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
42 struct cifs_sb_info *cifs_sb, const char *full_path,
43 __u32 desired_access, __u32 create_disposition,
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +100044 __u32 create_options, void *ptr, int command)
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +100045{
46 int rc;
47 __le16 *utf16_path = NULL;
48 __u8 oplock = SMB2_OPLOCK_LEVEL_NONE;
49 struct cifs_open_parms oparms;
50 struct cifs_fid fid;
51 struct cifs_ses *ses = tcon->ses;
52 struct TCP_Server_Info *server = ses->server;
53 int num_rqst = 0;
54 struct smb_rqst rqst[3];
55 int resp_buftype[3];
56 struct kvec rsp_iov[3];
57 struct kvec open_iov[SMB2_CREATE_IOV_SIZE];
58 struct kvec qi_iov[1];
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +100059 struct kvec si_iov[2]; /* 1 + potential padding. */
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +100060 struct kvec close_iov[1];
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +100061 struct smb2_query_info_rsp *qi_rsp = NULL;
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +100062 int flags = 0;
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +100063 __u8 delete_pending[8] = {1, 0, 0, 0, 0, 0, 0, 0};
64 unsigned int size[1];
65 void *data[1];
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +100066
67 if (smb3_encryption_required(tcon))
68 flags |= CIFS_TRANSFORM_REQ;
69
70 memset(rqst, 0, sizeof(rqst));
71 resp_buftype[0] = resp_buftype[1] = resp_buftype[2] = CIFS_NO_BUFFER;
72 memset(rsp_iov, 0, sizeof(rsp_iov));
73
74 /* Open */
75 utf16_path = cifs_convert_path_to_utf16(full_path, cifs_sb);
76 if (!utf16_path)
77 return -ENOMEM;
78
79 oparms.tcon = tcon;
80 oparms.desired_access = desired_access;
81 oparms.disposition = create_disposition;
82 oparms.create_options = create_options;
83 oparms.fid = &fid;
84 oparms.reconnect = false;
85
86 memset(&open_iov, 0, sizeof(open_iov));
87 rqst[num_rqst].rq_iov = open_iov;
88 rqst[num_rqst].rq_nvec = SMB2_CREATE_IOV_SIZE;
89 rc = SMB2_open_init(tcon, &rqst[num_rqst], &oplock, &oparms,
90 utf16_path);
91 kfree(utf16_path);
92 if (rc)
93 goto finished;
94
95 smb2_set_next_command(server, &rqst[num_rqst++]);
96
97 /* Operation */
98 switch (command) {
99 case SMB2_OP_QUERY_INFO:
100 memset(&qi_iov, 0, sizeof(qi_iov));
101 rqst[num_rqst].rq_iov = qi_iov;
102 rqst[num_rqst].rq_nvec = 1;
103
104 rc = SMB2_query_info_init(tcon, &rqst[num_rqst], COMPOUND_FID,
105 COMPOUND_FID, FILE_ALL_INFORMATION,
106 SMB2_O_INFO_FILE, 0,
107 sizeof(struct smb2_file_all_info) +
108 PATH_MAX * 2);
109 smb2_set_next_command(server, &rqst[num_rqst]);
110 smb2_set_related(&rqst[num_rqst++]);
111 break;
Ronnie Sahlberg47dd9592018-09-03 13:33:43 +1000112 case SMB2_OP_DELETE:
113 break;
Ronnie Sahlbergf733e392018-09-03 13:33:42 +1000114 case SMB2_OP_MKDIR:
115 /*
116 * Directories are created through parameters in the
117 * SMB2_open() call.
118 */
119 break;
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +1000120 case SMB2_OP_RMDIR:
121 memset(&si_iov, 0, sizeof(si_iov));
122 rqst[num_rqst].rq_iov = si_iov;
123 rqst[num_rqst].rq_nvec = 1;
124
125 size[0] = 8;
126 data[0] = &delete_pending[0];
127
128 rc = SMB2_set_info_init(tcon, &rqst[num_rqst], COMPOUND_FID,
129 COMPOUND_FID, current->tgid,
130 FILE_DISPOSITION_INFORMATION,
131 SMB2_O_INFO_FILE, 0, data, size);
132 smb2_set_next_command(server, &rqst[num_rqst]);
133 smb2_set_related(&rqst[num_rqst++]);
134 break;
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +1000135 default:
136 cifs_dbg(VFS, "Invalid command\n");
137 rc = -EINVAL;
138 }
139 if (rc)
140 goto finished;
141
142 /* Close */
143 memset(&close_iov, 0, sizeof(close_iov));
144 rqst[num_rqst].rq_iov = close_iov;
145 rqst[num_rqst].rq_nvec = 1;
146 rc = SMB2_close_init(tcon, &rqst[num_rqst], COMPOUND_FID,
147 COMPOUND_FID);
148 smb2_set_related(&rqst[num_rqst++]);
149 if (rc)
150 goto finished;
151
152 rc = compound_send_recv(xid, ses, flags, num_rqst, rqst,
153 resp_buftype, rsp_iov);
154
155 finished:
156 SMB2_open_free(&rqst[0]);
157 switch (command) {
158 case SMB2_OP_QUERY_INFO:
159 if (rc == 0) {
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +1000160 qi_rsp = (struct smb2_query_info_rsp *)
161 rsp_iov[1].iov_base;
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +1000162 rc = smb2_validate_and_copy_iov(
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +1000163 le16_to_cpu(qi_rsp->OutputBufferOffset),
164 le32_to_cpu(qi_rsp->OutputBufferLength),
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +1000165 &rsp_iov[1], sizeof(struct smb2_file_all_info),
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +1000166 ptr);
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +1000167 }
168 if (rqst[1].rq_iov)
169 SMB2_query_info_free(&rqst[1]);
170 if (rqst[2].rq_iov)
171 SMB2_close_free(&rqst[2]);
172 break;
Ronnie Sahlberg47dd9592018-09-03 13:33:43 +1000173 case SMB2_OP_DELETE:
Ronnie Sahlbergf733e392018-09-03 13:33:42 +1000174 case SMB2_OP_MKDIR:
175 if (rqst[1].rq_iov)
176 SMB2_close_free(&rqst[1]);
177 break;
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +1000178 case SMB2_OP_RMDIR:
179 if (rqst[1].rq_iov)
180 SMB2_set_info_free(&rqst[1]);
181 if (rqst[2].rq_iov)
182 SMB2_close_free(&rqst[2]);
183 break;
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +1000184 }
185 free_rsp_buf(resp_buftype[0], rsp_iov[0].iov_base);
186 free_rsp_buf(resp_buftype[1], rsp_iov[1].iov_base);
187 free_rsp_buf(resp_buftype[2], rsp_iov[2].iov_base);
188 return rc;
189}
190
191static int
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400192smb2_open_op_close(const unsigned int xid, struct cifs_tcon *tcon,
193 struct cifs_sb_info *cifs_sb, const char *full_path,
194 __u32 desired_access, __u32 create_disposition,
Pavel Shilovskyca819832013-07-05 12:21:26 +0400195 __u32 create_options, void *data, int command)
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400196{
197 int rc, tmprc = 0;
Steve French3d4ef9a2018-04-25 22:19:09 -0500198 __le16 *utf16_path = NULL;
Pavel Shilovsky2e44b282012-09-18 16:20:33 -0700199 __u8 oplock = SMB2_OPLOCK_LEVEL_NONE;
Pavel Shilovsky064f6042013-07-09 18:20:30 +0400200 struct cifs_open_parms oparms;
201 struct cifs_fid fid;
Steve French3d4ef9a2018-04-25 22:19:09 -0500202 bool use_cached_root_handle = false;
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400203
Steve French3d4ef9a2018-04-25 22:19:09 -0500204 if ((strcmp(full_path, "") == 0) && (create_options == 0) &&
205 (desired_access == FILE_READ_ATTRIBUTES) &&
206 (create_disposition == FILE_OPEN) &&
207 (tcon->nohandlecache == false)) {
208 rc = open_shroot(xid, tcon, &fid);
209 if (rc == 0)
210 use_cached_root_handle = true;
211 }
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400212
Steve French3d4ef9a2018-04-25 22:19:09 -0500213 if (use_cached_root_handle == false) {
214 utf16_path = cifs_convert_path_to_utf16(full_path, cifs_sb);
215 if (!utf16_path)
216 return -ENOMEM;
Pavel Shilovsky064f6042013-07-09 18:20:30 +0400217
Steve French3d4ef9a2018-04-25 22:19:09 -0500218 oparms.tcon = tcon;
219 oparms.desired_access = desired_access;
220 oparms.disposition = create_disposition;
221 oparms.create_options = create_options;
222 oparms.fid = &fid;
223 oparms.reconnect = false;
224
Ronnie Sahlberg9d874c32018-06-08 13:21:18 +1000225 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL,
226 NULL);
Steve French3d4ef9a2018-04-25 22:19:09 -0500227 if (rc) {
228 kfree(utf16_path);
229 return rc;
230 }
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400231 }
232
233 switch (command) {
Pavel Shilovsky35143eb2012-09-18 16:20:31 -0700234 case SMB2_OP_RENAME:
Pavel Shilovsky064f6042013-07-09 18:20:30 +0400235 tmprc = SMB2_rename(xid, tcon, fid.persistent_fid,
236 fid.volatile_fid, (__le16 *)data);
Pavel Shilovsky35143eb2012-09-18 16:20:31 -0700237 break;
Pavel Shilovsky568798c2012-09-18 16:20:31 -0700238 case SMB2_OP_HARDLINK:
Pavel Shilovsky064f6042013-07-09 18:20:30 +0400239 tmprc = SMB2_set_hardlink(xid, tcon, fid.persistent_fid,
240 fid.volatile_fid, (__le16 *)data);
Pavel Shilovsky568798c2012-09-18 16:20:31 -0700241 break;
Pavel Shilovskyc839ff22012-09-18 16:20:32 -0700242 case SMB2_OP_SET_EOF:
Pavel Shilovsky064f6042013-07-09 18:20:30 +0400243 tmprc = SMB2_set_eof(xid, tcon, fid.persistent_fid,
244 fid.volatile_fid, current->tgid,
Steve Frenchf29ebb42014-07-19 21:44:58 -0500245 (__le64 *)data, false);
Pavel Shilovskyc839ff22012-09-18 16:20:32 -0700246 break;
Pavel Shilovsky1feeaac2012-09-18 16:20:32 -0700247 case SMB2_OP_SET_INFO:
Ronnie Sahlbergba8ca112018-09-03 13:33:44 +1000248 tmprc = SMB2_set_basic_info(xid, tcon, fid.persistent_fid,
249 fid.volatile_fid,
250 (FILE_BASIC_INFO *)data);
Pavel Shilovsky1feeaac2012-09-18 16:20:32 -0700251 break;
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400252 default:
Joe Perchesf96637b2013-05-04 22:12:25 -0500253 cifs_dbg(VFS, "Invalid command\n");
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400254 break;
255 }
256
Ronnie Sahlberg9da6ec72018-07-31 08:48:22 +1000257 if (use_cached_root_handle)
258 close_shroot(&tcon->crfid);
259 else
Steve French3d4ef9a2018-04-25 22:19:09 -0500260 rc = SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400261 if (tmprc)
262 rc = tmprc;
263 kfree(utf16_path);
264 return rc;
265}
266
Pavel Shilovskyf0df7372012-09-18 16:20:26 -0700267void
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400268move_smb2_info_to_cifs(FILE_ALL_INFO *dst, struct smb2_file_all_info *src)
269{
270 memcpy(dst, src, (size_t)(&src->CurrentByteOffset) - (size_t)src);
271 dst->CurrentByteOffset = src->CurrentByteOffset;
272 dst->Mode = src->Mode;
273 dst->AlignmentRequirement = src->AlignmentRequirement;
274 dst->IndexNumber1 = 0; /* we don't use it */
275}
276
277int
278smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
279 struct cifs_sb_info *cifs_sb, const char *full_path,
Pavel Shilovskyeb85d94b2013-10-23 17:49:47 +0400280 FILE_ALL_INFO *data, bool *adjust_tz, bool *symlink)
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400281{
282 int rc;
283 struct smb2_file_all_info *smb2_data;
284
285 *adjust_tz = false;
Pavel Shilovskyeb85d94b2013-10-23 17:49:47 +0400286 *symlink = false;
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400287
Pavel Shilovsky1bbe4992014-08-22 13:32:11 +0400288 smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + PATH_MAX * 2,
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400289 GFP_KERNEL);
290 if (smb2_data == NULL)
291 return -ENOMEM;
292
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +1000293 rc = smb2_compound_op(xid, tcon, cifs_sb, full_path,
294 FILE_READ_ATTRIBUTES, FILE_OPEN, 0,
295 smb2_data, SMB2_OP_QUERY_INFO);
Pavel Shilovskyeb85d94b2013-10-23 17:49:47 +0400296 if (rc == -EOPNOTSUPP) {
297 *symlink = true;
298 /* Failed on a symbolic link - query a reparse point info */
Ronnie Sahlbergc5a5f382018-09-03 13:33:41 +1000299 rc = smb2_compound_op(xid, tcon, cifs_sb, full_path,
300 FILE_READ_ATTRIBUTES, FILE_OPEN,
301 OPEN_REPARSE_POINT, smb2_data,
302 SMB2_OP_QUERY_INFO);
Pavel Shilovskyeb85d94b2013-10-23 17:49:47 +0400303 }
Pavel Shilovskybe4cb9e2011-12-29 17:06:33 +0400304 if (rc)
305 goto out;
306
307 move_smb2_info_to_cifs(data, smb2_data);
308out:
309 kfree(smb2_data);
310 return rc;
311}
Pavel Shilovskya0e73182011-07-19 12:56:37 +0400312
313int
314smb2_mkdir(const unsigned int xid, struct cifs_tcon *tcon, const char *name,
315 struct cifs_sb_info *cifs_sb)
316{
Ronnie Sahlbergf733e392018-09-03 13:33:42 +1000317 return smb2_compound_op(xid, tcon, cifs_sb, name,
318 FILE_WRITE_ATTRIBUTES, FILE_CREATE,
319 CREATE_NOT_FILE, NULL, SMB2_OP_MKDIR);
Pavel Shilovskya0e73182011-07-19 12:56:37 +0400320}
321
322void
323smb2_mkdir_setinfo(struct inode *inode, const char *name,
324 struct cifs_sb_info *cifs_sb, struct cifs_tcon *tcon,
325 const unsigned int xid)
326{
327 FILE_BASIC_INFO data;
328 struct cifsInodeInfo *cifs_i;
329 u32 dosattrs;
330 int tmprc;
331
332 memset(&data, 0, sizeof(data));
333 cifs_i = CIFS_I(inode);
334 dosattrs = cifs_i->cifsAttrs | ATTR_READONLY;
335 data.Attributes = cpu_to_le32(dosattrs);
336 tmprc = smb2_open_op_close(xid, tcon, cifs_sb, name,
Pavel Shilovskyca819832013-07-05 12:21:26 +0400337 FILE_WRITE_ATTRIBUTES, FILE_CREATE,
Pavel Shilovskya0e73182011-07-19 12:56:37 +0400338 CREATE_NOT_FILE, &data, SMB2_OP_SET_INFO);
339 if (tmprc == 0)
340 cifs_i->cifsAttrs = dosattrs;
341}
Pavel Shilovsky1a500f02012-07-10 16:14:38 +0400342
343int
344smb2_rmdir(const unsigned int xid, struct cifs_tcon *tcon, const char *name,
345 struct cifs_sb_info *cifs_sb)
346{
Ronnie Sahlbergc2e0fe32018-09-03 13:33:45 +1000347 return smb2_compound_op(xid, tcon, cifs_sb, name, DELETE, FILE_OPEN,
348 CREATE_NOT_FILE,
349 NULL, SMB2_OP_RMDIR);
Pavel Shilovsky1a500f02012-07-10 16:14:38 +0400350}
Pavel Shilovskycbe6f432012-09-18 16:20:25 -0700351
352int
353smb2_unlink(const unsigned int xid, struct cifs_tcon *tcon, const char *name,
354 struct cifs_sb_info *cifs_sb)
355{
Ronnie Sahlberg47dd9592018-09-03 13:33:43 +1000356 return smb2_compound_op(xid, tcon, cifs_sb, name, DELETE, FILE_OPEN,
357 CREATE_DELETE_ON_CLOSE | OPEN_REPARSE_POINT,
358 NULL, SMB2_OP_DELETE);
Pavel Shilovskycbe6f432012-09-18 16:20:25 -0700359}
Pavel Shilovsky35143eb2012-09-18 16:20:31 -0700360
Pavel Shilovsky568798c2012-09-18 16:20:31 -0700361static int
362smb2_set_path_attr(const unsigned int xid, struct cifs_tcon *tcon,
363 const char *from_name, const char *to_name,
364 struct cifs_sb_info *cifs_sb, __u32 access, int command)
Pavel Shilovsky35143eb2012-09-18 16:20:31 -0700365{
366 __le16 *smb2_to_name = NULL;
367 int rc;
368
369 smb2_to_name = cifs_convert_path_to_utf16(to_name, cifs_sb);
370 if (smb2_to_name == NULL) {
371 rc = -ENOMEM;
372 goto smb2_rename_path;
373 }
374
Pavel Shilovsky568798c2012-09-18 16:20:31 -0700375 rc = smb2_open_op_close(xid, tcon, cifs_sb, from_name, access,
Pavel Shilovskyca819832013-07-05 12:21:26 +0400376 FILE_OPEN, 0, smb2_to_name, command);
Pavel Shilovsky35143eb2012-09-18 16:20:31 -0700377smb2_rename_path:
378 kfree(smb2_to_name);
379 return rc;
380}
Pavel Shilovsky568798c2012-09-18 16:20:31 -0700381
382int
383smb2_rename_path(const unsigned int xid, struct cifs_tcon *tcon,
384 const char *from_name, const char *to_name,
385 struct cifs_sb_info *cifs_sb)
386{
387 return smb2_set_path_attr(xid, tcon, from_name, to_name, cifs_sb,
388 DELETE, SMB2_OP_RENAME);
389}
390
391int
392smb2_create_hardlink(const unsigned int xid, struct cifs_tcon *tcon,
393 const char *from_name, const char *to_name,
394 struct cifs_sb_info *cifs_sb)
395{
396 return smb2_set_path_attr(xid, tcon, from_name, to_name, cifs_sb,
397 FILE_READ_ATTRIBUTES, SMB2_OP_HARDLINK);
398}
Pavel Shilovskyc839ff22012-09-18 16:20:32 -0700399
400int
401smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon,
402 const char *full_path, __u64 size,
403 struct cifs_sb_info *cifs_sb, bool set_alloc)
404{
405 __le64 eof = cpu_to_le64(size);
406 return smb2_open_op_close(xid, tcon, cifs_sb, full_path,
Pavel Shilovskyca819832013-07-05 12:21:26 +0400407 FILE_WRITE_DATA, FILE_OPEN, 0, &eof,
Pavel Shilovskyc839ff22012-09-18 16:20:32 -0700408 SMB2_OP_SET_EOF);
409}
Pavel Shilovsky1feeaac2012-09-18 16:20:32 -0700410
411int
412smb2_set_file_info(struct inode *inode, const char *full_path,
413 FILE_BASIC_INFO *buf, const unsigned int xid)
414{
415 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
416 struct tcon_link *tlink;
417 int rc;
418
Steve French18dd8e12016-09-26 14:23:08 -0500419 if ((buf->CreationTime == 0) && (buf->LastAccessTime == 0) &&
Steve Frenchfd09b7d2018-08-02 20:28:18 -0500420 (buf->LastWriteTime == 0) && (buf->ChangeTime == 0) &&
Steve French18dd8e12016-09-26 14:23:08 -0500421 (buf->Attributes == 0))
422 return 0; /* would be a no op, no sense sending this */
423
Pavel Shilovsky1feeaac2012-09-18 16:20:32 -0700424 tlink = cifs_sb_tlink(cifs_sb);
425 if (IS_ERR(tlink))
426 return PTR_ERR(tlink);
Steve French18dd8e12016-09-26 14:23:08 -0500427
Pavel Shilovsky1feeaac2012-09-18 16:20:32 -0700428 rc = smb2_open_op_close(xid, tlink_tcon(tlink), cifs_sb, full_path,
Pavel Shilovskyca819832013-07-05 12:21:26 +0400429 FILE_WRITE_ATTRIBUTES, FILE_OPEN, 0, buf,
Pavel Shilovsky1feeaac2012-09-18 16:20:32 -0700430 SMB2_OP_SET_INFO);
431 cifs_put_tlink(tlink);
432 return rc;
433}