diff options
author | Paulo Alcantara <pc@manguebit.com> | 2023-11-26 05:55:03 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-01-08 00:46:05 +0300 |
commit | 102466f303ffcd5cff207b3c122557f73f1041e6 (patch) | |
tree | 3f6c69b86dbb4343870b24ea3a289823622835ae /fs/smb/client/file.c | |
parent | 3322960ce222997b1663ffa69e691b2edfec4ac9 (diff) | |
download | linux-102466f303ffcd5cff207b3c122557f73f1041e6.tar.xz |
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/file.c')
-rw-r--r-- | fs/smb/client/file.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c index 32a8525415d9..d0387916de95 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -1020,14 +1020,16 @@ reopen_success: if (!is_interrupt_error(rc)) mapping_set_error(inode->i_mapping, rc); - if (tcon->posix_extensions) - rc = smb311_posix_get_inode_info(&inode, full_path, inode->i_sb, xid); - else if (tcon->unix_ext) + if (tcon->posix_extensions) { + rc = smb311_posix_get_inode_info(&inode, full_path, + NULL, inode->i_sb, xid); + } else if (tcon->unix_ext) { rc = cifs_get_inode_info_unix(&inode, full_path, inode->i_sb, xid); - else + } else { rc = cifs_get_inode_info(&inode, full_path, NULL, inode->i_sb, xid, NULL); + } } /* * Else we are writing out data to server already and could deadlock if |