24 #include <linux/stat.h>
25 #include <linux/slab.h>
27 #include <asm/div64.h>
41 smb2_open_op_close(
const unsigned int xid,
struct cifs_tcon *tcon,
43 __u32 desired_access,
__u32 create_disposition,
48 u64 persistent_fid, volatile_fid;
56 rc =
SMB2_open(xid, tcon, utf16_path, &persistent_fid, &volatile_fid,
57 desired_access, create_disposition, file_attributes,
58 create_options, &oplock,
NULL);
79 tmprc =
SMB2_rename(xid, tcon, persistent_fid, volatile_fid,
84 volatile_fid, (
__le16 *)data);
87 tmprc =
SMB2_set_eof(xid, tcon, persistent_fid, volatile_fid,
91 tmprc =
SMB2_set_info(xid, tcon, persistent_fid, volatile_fid,
92 (FILE_BASIC_INFO *)data);
95 cERROR(1,
"Invalid command");
99 rc =
SMB2_close(xid, tcon, persistent_fid, volatile_fid);
110 dst->CurrentByteOffset = src->CurrentByteOffset;
111 dst->Mode = src->Mode;
112 dst->AlignmentRequirement = src->AlignmentRequirement;
113 dst->IndexNumber1 = 0;
119 FILE_ALL_INFO *data,
bool *adjust_tz)
128 if (smb2_data ==
NULL)
131 rc = smb2_open_op_close(xid, tcon, cifs_sb, full_path,
147 return smb2_open_op_close(xid, tcon, cifs_sb, name,
155 const unsigned int xid)
157 FILE_BASIC_INFO
data;
162 memset(&data, 0,
sizeof(data));
163 cifs_i = CIFS_I(inode);
166 tmprc = smb2_open_op_close(xid, tcon, cifs_sb, name,
192 smb2_set_path_attr(
const unsigned int xid,
struct cifs_tcon *tcon,
193 const char *from_name,
const char *to_name,
200 if (smb2_to_name ==
NULL) {
205 rc = smb2_open_op_close(xid, tcon, cifs_sb, from_name, access,
214 const char *from_name,
const char *to_name,
217 return smb2_set_path_attr(xid, tcon, from_name, to_name, cifs_sb,
223 const char *from_name,
const char *to_name,
226 return smb2_set_path_attr(xid, tcon, from_name, to_name, cifs_sb,
236 return smb2_open_op_close(xid, tcon, cifs_sb, full_path,
243 FILE_BASIC_INFO *
buf,
const unsigned int xid)
251 return PTR_ERR(tlink);
252 rc = smb2_open_op_close(xid, tlink_tcon(tlink), cifs_sb, full_path,