From 52b9666efd8b0874d334de718a7d561e7b0eb1cc Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 19 Feb 2019 14:59:43 +0100 Subject: udf: Drop pointless check from udf_sync_fs() The check if (bh) in udf_sync_fs() is pointless as we cannot have sbi->s_lvid_dirty and !sbi->s_lvid_bh (as already asserted by udf_updated_lvid()). So just drop the pointless check. Reviewed-by: Steven J. Magnani Reported-by: Colin Ian King Signed-off-by: Jan Kara --- fs/udf/super.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'fs/udf/super.c') diff --git a/fs/udf/super.c b/fs/udf/super.c index a6940d90bedd..ffd8038ff728 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -2330,13 +2330,10 @@ static int udf_sync_fs(struct super_block *sb, int wait) mutex_lock(&sbi->s_alloc_mutex); if (sbi->s_lvid_dirty) { struct buffer_head *bh = sbi->s_lvid_bh; + struct logicalVolIntegrityDesc *lvid; - if (bh) { - struct logicalVolIntegrityDesc *lvid; - - lvid = (struct logicalVolIntegrityDesc *)bh->b_data; - udf_finalize_lvid(lvid); - } + lvid = (struct logicalVolIntegrityDesc *)bh->b_data; + udf_finalize_lvid(lvid); /* * Blockdevice will be synced later so we don't have to submit -- cgit v1.2.3