diff mbox

btrfs-progs: remove meaningless field write of scrub status file

Message ID 1523331103-20857-1-git-send-email-gujx@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gu Jinxiang April 10, 2018, 3:31 a.m. UTC
Since ret must be 0 when goes to scrub status file's write,
so scrub_write_buf(fd, buf, ret) writes nothing.
And when I check the process for read scrub status file,
there is no process for this field.
So, remove it.

Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
---
 cmds-scrub.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox

Patch

diff --git a/cmds-scrub.c b/cmds-scrub.c
index 8cf1e5df..efd7db94 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -753,7 +753,6 @@  static int scrub_write_file(int fd, const char *fsid,
 		    scrub_write_buf(fd, ":", 1) ||
 		    scrub_writev(fd, buf, sizeof(buf), "%lld",
 					use->scrub_args.devid) ||
-		    scrub_write_buf(fd, buf, ret) ||
 		    _SCRUB_KVWRITE(fd, buf, data_extents_scrubbed, use) ||
 		    _SCRUB_KVWRITE(fd, buf, tree_extents_scrubbed, use) ||
 		    _SCRUB_KVWRITE(fd, buf, data_bytes_scrubbed, use) ||