diff options
author | Paulo Alcantara <pc@manguebit.com> | 2023-11-26 03:55:03 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-01-07 22:46:05 +0100 |
commit | 102466f303ffcd5cff207b3c122557f73f1041e6 (patch) | |
tree | 3f6c69b86dbb4343870b24ea3a289823622835ae /fs/smb/client/link.c | |
parent | smb: client: extend smb2_compound_op() to accept more commands (diff) | |
download | linux-102466f303ffcd5cff207b3c122557f73f1041e6.tar.xz linux-102466f303ffcd5cff207b3c122557f73f1041e6.zip |
smb: client: allow creating special files via reparse points
Add support for creating special files (e.g. char/block devices,
sockets, fifos) via NFS reparse points on SMB2+, which are fully
supported by most SMB servers and documented in MS-FSCC.
smb2_get_reparse_inode() creates the file with a corresponding reparse
point buffer set in @iov through a single roundtrip to the server.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311260746.HOJ039BV-lkp@intel.com/
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/link.c')
-rw-r--r-- | fs/smb/client/link.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/smb/client/link.c b/fs/smb/client/link.c index a1da50e66fbb..5ce0f74be4ec 100644 --- a/fs/smb/client/link.c +++ b/fs/smb/client/link.c @@ -614,14 +614,16 @@ cifs_symlink(struct mnt_idmap *idmap, struct inode *inode, cifs_sb_target->local_nls); */ if (rc == 0) { - if (pTcon->posix_extensions) - rc = smb311_posix_get_inode_info(&newinode, full_path, inode->i_sb, xid); - else if (pTcon->unix_ext) + if (pTcon->posix_extensions) { + rc = smb311_posix_get_inode_info(&newinode, full_path, + NULL, inode->i_sb, xid); + } else if (pTcon->unix_ext) { rc = cifs_get_inode_info_unix(&newinode, full_path, inode->i_sb, xid); - else + } else { rc = cifs_get_inode_info(&newinode, full_path, NULL, inode->i_sb, xid, NULL); + } if (rc != 0) { cifs_dbg(FYI, "Create symlink ok, getinodeinfo fail rc = %d\n", |