[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250429054916.2343-1-liubo03@inspur.com>
Date: Tue, 29 Apr 2025 01:49:16 -0400
From: Bo Liu <liubo03@...pur.com>
To: <agruenba@...hat.com>
CC: <gfs2@...ts.linux.dev>, <linux-kernel@...r.kernel.org>, Bo Liu
<liubo03@...pur.com>
Subject: [PATCH] gfs2: Remove set but not used variable 'xattr_initialized'
The variable xattr_initialized is assigned and never used, so can be removed.
Signed-off-by: Bo Liu <liubo03@...pur.com>
---
fs/gfs2/inode.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 95c39798901b..f87f21b93b43 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -701,7 +701,6 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
u32 aflags = 0;
unsigned blocks = 1;
struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, };
- bool xattr_initialized = false;
if (!name->len || name->len > GFS2_FNAMESIZE)
return -ENAMETOOLONG;
@@ -843,10 +842,8 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
if (error)
goto fail_gunlock3;
- if (blocks > 1) {
+ if (blocks > 1)
gfs2_init_xattr(ip);
- xattr_initialized = true;
- }
init_dinode(dip, ip, symname);
gfs2_trans_end(sdp);
--
2.31.1
Powered by blists - more mailing lists