Skip to content

Commit 85485c7

Browse files
committed
smb: client: ignore unhandled reparse tags
jira LE-2522 Rebuild_History Non-Buildable kernel-5.14.0-503.29.1.el9_5 commit-author Paulo Alcantara <[email protected]> commit ec68680 Just ignore reparse points that the client can't parse rather than bailing out and not opening the file or directory. Reported-by: Marc <[email protected]> Closes: https://lore.kernel.org/r/CAMHwNVv-B+Q6wa0FEXrAuzdchzcJRsPKDDRrNaYZJd6X-+iJzw@mail.gmail.com Fixes: 539aad7 ("smb: client: introduce ->parse_reparse_point()") Tested-by: Anthony Nandaa (Microsoft) <[email protected]> Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]> (cherry picked from commit ec68680) Signed-off-by: Jonathan Maple <[email protected]>
1 parent b14215f commit 85485c7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

fs/smb/client/reparse.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ int parse_reparse_point(struct reparse_data_buffer *buf,
378378
u32 plen, struct cifs_sb_info *cifs_sb,
379379
bool unicode, struct cifs_open_info_data *data)
380380
{
381+
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
382+
381383
data->reparse.buf = buf;
382384

383385
/* See MS-FSCC 2.1.2 */
@@ -394,12 +396,13 @@ int parse_reparse_point(struct reparse_data_buffer *buf,
394396
case IO_REPARSE_TAG_LX_FIFO:
395397
case IO_REPARSE_TAG_LX_CHR:
396398
case IO_REPARSE_TAG_LX_BLK:
397-
return 0;
399+
break;
398400
default:
399-
cifs_dbg(VFS, "%s: unhandled reparse tag: 0x%08x\n",
400-
__func__, le32_to_cpu(buf->ReparseTag));
401-
return -EOPNOTSUPP;
401+
cifs_tcon_dbg(VFS | ONCE, "unhandled reparse tag: 0x%08x\n",
402+
le32_to_cpu(buf->ReparseTag));
403+
break;
402404
}
405+
return 0;
403406
}
404407

405408
int smb2_parse_reparse_point(struct cifs_sb_info *cifs_sb,

0 commit comments

Comments
 (0)