summaryrefslogtreecommitdiffstats
path: root/fs/smb/client/cifsglob.h
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2024-01-25 19:21:48 -0300
committerSteve French <stfrench@microsoft.com>2024-03-10 19:33:58 -0500
commitfa792d8d235c20df5f422e4bd172db1efde55ab9 (patch)
tree436f64f647243fe50df99e4e2a11d6a6719e3494 /fs/smb/client/cifsglob.h
parent6914d288c63682e20e0f6e1e0b8e8f5847012d67 (diff)
downloadlinux-stable-fa792d8d235c20df5f422e4bd172db1efde55ab9.tar.gz
linux-stable-fa792d8d235c20df5f422e4bd172db1efde55ab9.tar.bz2
linux-stable-fa792d8d235c20df5f422e4bd172db1efde55ab9.zip
smb: client: reduce number of parameters in smb2_compound_op()
Replace @desired_access, @create_disposition, @create_options and @mode parameters with a single @oparms. No functional changes. Signed-off-by: Paulo Alcantara <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r--fs/smb/client/cifsglob.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index afff1a91a9c8..345710ea9616 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -2273,6 +2273,17 @@ static inline void cifs_sg_set_buf(struct sg_table *sgtable,
}
}
+#define CIFS_OPARMS(_cifs_sb, _tcon, _path, _da, _cd, _co, _mode) \
+ ((struct cifs_open_parms) { \
+ .tcon = _tcon, \
+ .path = _path, \
+ .desired_access = (_da), \
+ .disposition = (_cd), \
+ .create_options = cifs_create_options(_cifs_sb, (_co)), \
+ .mode = (_mode), \
+ .cifs_sb = _cifs_sb, \
+ })
+
struct smb2_compound_vars {
struct cifs_open_parms oparms;
struct kvec rsp_iov[MAX_COMPOUND];