]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Feb 2012 19:28:49 +0000 (11:28 -0800)
commit 853a0c25baf96b028de1654bea1e0c8857eadf3d upstream.

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>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/udf/super.c

index 1e4543cbcd276decb1b43942e999b9f2f851b145..ee6b3af8a65920aa5a81bf509a53c23cb45dfa98 100644 (file)
@@ -1791,6 +1791,12 @@ static void udf_open_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;
 }