]> git.baikalelectronics.ru Git - kernel.git/commitdiff
smb311: Add support for SMB311 query info (non-compounded)
authorSteve French <stfrench@microsoft.com>
Fri, 12 Jun 2020 01:23:38 +0000 (20:23 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 12 Jun 2020 11:21:06 +0000 (06:21 -0500)
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 <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
fs/cifs/smb2pdu.c
fs/cifs/smb2proto.h

index 3f232c8da39091797b4c625cd5174c5c09e3fd60..3f5c3dd57c86c1096741d8eedf861df58d57d9bf 100644 (file)
@@ -3458,6 +3458,19 @@ int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon,
                          NULL);
 }
 
+int
+SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon,
+               u64 persistent_fid, u64 volatile_fid, struct smb311_posix_qinfo *data, u32 *plen)
+{
+       size_t output_len = sizeof(struct smb311_posix_qinfo *) +
+                       (sizeof(struct cifs_sid) * 2) + (PATH_MAX * 2);
+       *plen = 0;
+
+       return query_info(xid, tcon, persistent_fid, volatile_fid,
+                         SMB_FIND_FILE_POSIX_INFO, SMB2_O_INFO_FILE, 0,
+                         output_len, sizeof(struct smb311_posix_qinfo), (void **)&data, plen);
+}
+
 int
 SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon,
                u64 persistent_fid, u64 volatile_fid,
index a5c6da59847e28465b82c7fc4a48304a79fd2e9b..2f8ecbf5421418b1b4e6dbc63a2c1879fcaf19e2 100644 (file)
@@ -182,6 +182,8 @@ extern int SMB2_flush_init(const unsigned int xid, struct smb_rqst *rqst,
                           struct TCP_Server_Info *server,
                           u64 persistent_file_id, u64 volatile_file_id);
 extern void SMB2_flush_free(struct smb_rqst *rqst);
+extern int SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon,
+               u64 persistent_fid, u64 volatile_fid, struct smb311_posix_qinfo *data, u32 *plen);
 extern int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon,
                           u64 persistent_file_id, u64 volatile_file_id,
                           struct smb2_file_all_info *data);