All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Steve French <sfrench@samba.org>,
	Paulo Alcantara <pc@manguebit.com>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>
Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] cifs: Throw -EOPNOTSUPP error on unsupported reparse point type from parse_reparse_point()
Date: Sun, 22 Dec 2024 15:58:42 +0100	[thread overview]
Message-ID: <20241222145845.23801-2-pali@kernel.org> (raw)
In-Reply-To: <20241222145845.23801-1-pali@kernel.org>

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@kernel.org>
---
 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 4ea987f84bd1..63a95ecc7542 100644
--- a/fs/smb/client/reparse.c
+++ b/fs/smb/client/reparse.c
@@ -1088,13 +1088,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.20.1


  reply	other threads:[~2024-12-22 14:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-22 14:58 [PATCH 0/4] cifs: Handle all name surrogate reparse points Pali Rohár
2024-12-22 14:58 ` Pali Rohár [this message]
2024-12-22 14:58 ` [PATCH 2/4] cifs: Treat unhandled directory name surrogate reparse points as mount directory nodes Pali Rohár
2024-12-22 14:58 ` [PATCH 3/4] cifs: Remove explicit handling of IO_REPARSE_TAG_MOUNT_POINT in inode.c Pali Rohár
2024-12-22 14:58 ` [PATCH 4/4] cifs: Improve handling of name surrogate reparse points in reparse.c Pali Rohár
2025-02-23 22:23 ` [PATCH 0/4] cifs: Handle all name surrogate reparse points Pali Rohár
2025-02-24  0:48   ` Steve French
2025-03-02 12:24     ` Pali Rohár
2025-03-03  1:01       ` Steve French
2025-03-04 20:37         ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241222145845.23801-2-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pc@manguebit.com \
    --cc=ronniesahlberg@gmail.com \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.