[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241024092957.55401-1-yangchenzhi@vivo.com>
Date: Thu, 24 Oct 2024 17:29:55 +0800
From: Yang Chenzhi <yangchenzhi@...o.com>
To: Christian Brauner <brauner@...nel.org>,
Josef Bacik <josef@...icpanda.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Al Viro <viro@...iv.linux.org.uk>,
"Fabio M. De Francesco" <fabio.maria.de.francesco@...ux.intel.com>,
Yang Chenzhi <yangchenzhi@...o.com>,
linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com
Subject: [PATCH] fs/minix: Add missing curly braces in minix_empty for clarity
The if-else chain in the function minix_empty_dir() lacks curly braces,
which makes it harder to read and could lead to confusion. This patch
adds curly braces to the affected if-else statements to clarify the
control flow and improve code readability.
This change does not modify the functionality of the code, just ensures
that the structure is clearer.
Signed-off-by: Yang Chenzhi <yangchenzhi@...o.com>
---
fs/minix/dir.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/minix/dir.c b/fs/minix/dir.c
index dd2a425b41f0..42e1c46ae729 100644
--- a/fs/minix/dir.c
+++ b/fs/minix/dir.c
@@ -388,10 +388,11 @@ int minix_empty_dir(struct inode * inode)
if (!name[1]) {
if (inumber != inode->i_ino)
goto not_empty;
- } else if (name[1] != '.')
+ } else if (name[1] != '.') {
goto not_empty;
- else if (name[2])
+ } else if (name[2]) {
goto not_empty;
+ }
}
}
folio_release_kmap(folio, kaddr);
--
2.34.1
Powered by blists - more mailing lists