Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 348acd48 authored by Adrian Bunk's avatar Adrian Bunk Committed by Steven Whitehouse
Browse files

[GFS2] fs/gfs2/dir.c:gfs2_dir_write_data(): don't use an uninitialized variable



In the "if (extlen)" case, "new" might be used uninitialized.

Looking at the code, it should be initialized to 0.

Spotted by the Coverity checker.

Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent b0cb6695
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -184,7 +184,7 @@ static int gfs2_dir_write_data(struct gfs2_inode *ip, const char *buf,
	while (copied < size) {
	while (copied < size) {
		unsigned int amount;
		unsigned int amount;
		struct buffer_head *bh;
		struct buffer_head *bh;
		int new;
		int new = 0;


		amount = size - copied;
		amount = size - copied;
		if (amount > sdp->sd_sb.sb_bsize - o)
		if (amount > sdp->sd_sb.sb_bsize - o)