Re: [PATCH] ubifs: remove unnecessary check in ubifs_log_start_commit

2018-08-21 Thread Richard Weinberger
Am Dienstag, 21. August 2018, 08:57:44 CEST schrieb liu.son...@zte.com.cn: > Hi Richard, > > In ubifs_log_start_commit, the value of c->lhead_offs is zero or set to zero > by code bellow > 409 /* Switch to the next log LEB */ > 410 if (c->lhead_offs) { > 411 c->lhe

Re: [PATCH] ubifs: remove unnecessary check in ubifs_log_start_commit

2018-08-20 Thread Richard Weinberger
Liu Song, Am Dienstag, 21. August 2018, 05:17:22 CEST schrieb Liu Song: > The value of c->lhead_offs cannot exceed max_len which much > smaller than c->leb_size. So the check will never be true. > Just remove it. Please explain in more detail why this case is never ever possible. Removing such co

[PATCH] ubifs: remove unnecessary check in ubifs_log_start_commit

2018-08-20 Thread Liu Song
The value of c->lhead_offs cannot exceed max_len which much smaller than c->leb_size. So the check will never be true. Just remove it. Signed-off-by: Liu Song Reviewed-by: Jiang Biao --- fs/ubifs/log.c | 4 1 file changed, 4 deletions(-) diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c index