udf: Mark LVID buffer as uptodate before marking it dirty
authorJan Kara <jack@suse.cz>
Fri, 23 Dec 2011 10:53:07 +0000 (11:53 +0100)
committerJan Kara <jack@suse.cz>
Mon, 9 Jan 2012 12:52:10 +0000 (13:52 +0100)
When we hit EIO while writing LVID, the buffer uptodate bit is cleared.
This then results in an anoying warning from mark_buffer_dirty() when we
write the buffer again. So just set uptodate flag unconditionally.

Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/super.c

index e185253470dfa71725f4dc33ebc78463805908d9..87cb24a0ee7b3fc40c3174096407bbe9b0c2b8bc 100644 (file)
@@ -1799,6 +1799,12 @@ static void udf_close_lvid(struct super_block *sb)
                                le16_to_cpu(lvid->descTag.descCRCLength)));
 
        lvid->descTag.tagChecksum = udf_tag_checksum(&lvid->descTag);
+       /*
+        * We set buffer uptodate unconditionally here to avoid spurious
+        * warnings from mark_buffer_dirty() when previous EIO has marked
+        * the buffer as !uptodate
+        */
+       set_buffer_uptodate(bh);
        mark_buffer_dirty(bh);
        sbi->s_lvid_dirty = 0;
        mutex_unlock(&sbi->s_alloc_mutex);
This page took 0.082407 seconds and 5 git commands to generate.