[PATCH] smb: client: Simplify conditional compilation in __cifs_do_create()

Markus Elfring <[email protected]> Fri, 12 Jun 2026 19:39:01 +0200
Newsgroups gmane.linux.kernel.janitors,gmane.linux.kernel.cifs,gmane.network.samba.internals,gmane.linux.kernel,gmane.linux.file-systems
Message-ID <[email protected]>
From: Markus Elfring <[email protected]>
Date: Fri, 12 Jun 2026 19:24:14 +0200

Move an opening curly bracket behind the preprocessor directive =E2=80=9C#=
endif=E2=80=9D
so that an =E2=80=9C#else=E2=80=9D branch can be omitted.

Signed-off-by: Markus Elfring <[email protected]>
=2D--
 fs/smb/client/dir.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/smb/client/dir.c b/fs/smb/client/dir.c
index 88a4a1787ff0..1e747e8c51e5 100644
=2D-- a/fs/smb/client/dir.c
+++ b/fs/smb/client/dir.c
@@ -432,10 +432,9 @@ static int __cifs_do_create(struct inode *dir, struct=
 dentry *direntry,
 	if (tcon->unix_ext)
 		rc =3D cifs_get_inode_info_unix(&newinode, full_path, dir->i_sb,
 					      xid);
-	else {
-#else
-	{
+	else
 #endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
+	{
 		/* TODO: Add support for calling POSIX query info here, but passing in =
fid */
 		rc =3D cifs_get_inode_info(&newinode, full_path, buf, dir->i_sb, xid, f=
id);
 		if (newinode) {
=2D-=20
2.54.0