Do you have an easy repro scenario for the attached patch of Pali's (e.g. creating on windows, a reparse point that will be unhandled on Linux)? -- Thanks, Steve
From e6aaab0cdf4fa1bb7b6605a64a598e2dec5b94d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@xxxxxxxxxx> Date: Wed, 18 Sep 2024 00:16:05 +0200 Subject: [PATCH 12/43] cifs: Throw -EOPNOTSUPP error on unsupported reparse point type from parse_reparse_point() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This would help to track and detect by caller if the reparse point type was processed or not. Signed-off-by: Pali Rohár <pali@xxxxxxxxxx> --- fs/smb/client/reparse.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/smb/client/reparse.c b/fs/smb/client/reparse.c index cc5d86c01bdc..a3e2775b03d9 100644 --- a/fs/smb/client/reparse.c +++ b/fs/smb/client/reparse.c @@ -1063,13 +1063,12 @@ int parse_reparse_point(struct reparse_data_buffer *buf, le32_to_cpu(buf->ReparseTag)); return -EIO; } - break; + return 0; default: cifs_tcon_dbg(VFS | ONCE, "unhandled reparse tag: 0x%08x\n", le32_to_cpu(buf->ReparseTag)); - break; + return -EOPNOTSUPP; } - return 0; } int smb2_parse_reparse_point(struct cifs_sb_info *cifs_sb, -- 2.43.0