Skip to content

Commit b1bc187

Browse files
committed
smb311: Add support for SMB311 query info (non-compounded)
Add worker function for non-compounded SMB3.1.1 POSIX Extensions query info. This is needed for revalidate of root (cached) directory for example. Signed-off-by: Steve French <[email protected]> Reviewed-by: Ronnie Sahlberg <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]>
1 parent 6a5f659 commit b1bc187

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

fs/cifs/smb2pdu.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3458,6 +3458,19 @@ int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon,
34583458
NULL);
34593459
}
34603460

3461+
int
3462+
SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon,
3463+
u64 persistent_fid, u64 volatile_fid, struct smb311_posix_qinfo *data, u32 *plen)
3464+
{
3465+
size_t output_len = sizeof(struct smb311_posix_qinfo *) +
3466+
(sizeof(struct cifs_sid) * 2) + (PATH_MAX * 2);
3467+
*plen = 0;
3468+
3469+
return query_info(xid, tcon, persistent_fid, volatile_fid,
3470+
SMB_FIND_FILE_POSIX_INFO, SMB2_O_INFO_FILE, 0,
3471+
output_len, sizeof(struct smb311_posix_qinfo), (void **)&data, plen);
3472+
}
3473+
34613474
int
34623475
SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon,
34633476
u64 persistent_fid, u64 volatile_fid,

fs/cifs/smb2proto.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ extern int SMB2_flush_init(const unsigned int xid, struct smb_rqst *rqst,
182182
struct TCP_Server_Info *server,
183183
u64 persistent_file_id, u64 volatile_file_id);
184184
extern void SMB2_flush_free(struct smb_rqst *rqst);
185+
extern int SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon,
186+
u64 persistent_fid, u64 volatile_fid, struct smb311_posix_qinfo *data, u32 *plen);
185187
extern int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon,
186188
u64 persistent_file_id, u64 volatile_file_id,
187189
struct smb2_file_all_info *data);

0 commit comments

Comments
 (0)