public inbox for gfs2@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH]  gfs2: Remove set but not used variable 'xattr_initialized'
@ 2025-04-29  5:49 Bo Liu
  2025-04-29  9:25 ` Andreas Gruenbacher
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bo Liu @ 2025-04-29  5:49 UTC (permalink / raw)
  To: agruenba; +Cc: gfs2, linux-kernel, Bo Liu

The variable xattr_initialized is assigned and never used, so can be removed.

Signed-off-by: Bo Liu <liubo03@inspur.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-30  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29  5:49 [PATCH] gfs2: Remove set but not used variable 'xattr_initialized' Bo Liu
2025-04-29  9:25 ` Andreas Gruenbacher
2025-04-30  6:17 ` kernel test robot
2025-04-30  8:43 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox