diff options
author | Paulo Alcantara <pc@manguebit.com> | 2023-11-26 03:55:07 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-01-07 22:46:06 +0100 |
commit | 5408990aa662bcfd6ba894734023a023a16e8729 (patch) | |
tree | 926738354eaea0c27e823c560fa78920973f9e08 /fs/smb/client/link.c | |
parent | smb: client: fix renaming of reparse points (diff) | |
download | linux-5408990aa662bcfd6ba894734023a023a16e8729.tar.xz linux-5408990aa662bcfd6ba894734023a023a16e8729.zip |
smb: client: fix hardlinking of reparse points
The client was sending an SMB2_CREATE request without setting
OPEN_REPARSE_POINT flag thus failing the entire hardlink operation.
Fix this by setting OPEN_REPARSE_POINT in create options for
SMB2_CREATE request when the source inode is a repase point.
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/smb/client/link.c b/fs/smb/client/link.c index 5ce0f74be4ec..691f43a1ec2b 100644 --- a/fs/smb/client/link.c +++ b/fs/smb/client/link.c @@ -510,8 +510,8 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode, rc = -ENOSYS; goto cifs_hl_exit; } - rc = server->ops->create_hardlink(xid, tcon, from_name, to_name, - cifs_sb); + rc = server->ops->create_hardlink(xid, tcon, old_file, + from_name, to_name, cifs_sb); if ((rc == -EIO) || (rc == -EINVAL)) rc = -EOPNOTSUPP; } |