Re: [PATCH 2/7] cifs: Improve creating native symlinks pointing to directory

From: Pali Rohár
Date: Sun Sep 29 2024 - 18:11:16 EST


On Sunday 29 September 2024 16:54:20 Steve French wrote:
> Here is a version of the same patch without the function rename (so
> presumably easier to backport) and also that fixes to minor checkpatch
> warnings (and merged this and also patches 3, 4 and 6 into
> cifs-2.6.git for-next pending additional review and tesitng):

That is fine for me. Just one minor nit suggestion.

> @@ -69,7 +192,8 @@ int smb2_create_reparse_symlink(const unsigned int xid, struct inode *inode,
> iov.iov_base = buf;
> iov.iov_len = len;
> new = smb2_get_reparse_inode(&data, inode->i_sb, xid,
> - tcon, full_path, &iov, NULL);
> + tcon, full_path, directory,
> + &iov, NULL);

After reverting back the original function name, you can indent/align
arguments for all smb2_get_reparse_inode occurrences.

> if (!IS_ERR(new))
> d_instantiate(dentry, new);
> else
> @@ -137,7 +261,7 @@ static int mknod_nfs(unsigned int xid, struct inode *inode,
> };
>
> new = smb2_get_reparse_inode(&data, inode->i_sb, xid,
> - tcon, full_path, &iov, NULL);
> + tcon, full_path, false, &iov, NULL);
> if (!IS_ERR(new))
> d_instantiate(dentry, new);
> else
> @@ -283,7 +407,7 @@ static int mknod_wsl(unsigned int xid, struct inode *inode,
> data.wsl.eas_len = len;
>
> new = smb2_get_reparse_inode(&data, inode->i_sb,
> - xid, tcon, full_path,
> + xid, tcon, full_path, false,
> &reparse_iov, &xattr_iov);

Here the misaligning on + line is visible too.

> if (!IS_ERR(new))
> d_instantiate(dentry, new);