]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/buffer.c
I2C: TWL4030: checkpatch.pl fixes to rtc-twl4030.c
[linux-2.6-omap-h63xx.git] / fs / buffer.c
index 7ba58386beee459779da2056d662572496ff2096..98196327ddf0dddc2b3a911441bd4ff493026abf 100644 (file)
@@ -2564,14 +2564,13 @@ int nobh_write_end(struct file *file, struct address_space *mapping,
        struct inode *inode = page->mapping->host;
        struct buffer_head *head = fsdata;
        struct buffer_head *bh;
+       BUG_ON(fsdata != NULL && page_has_buffers(page));
 
-       if (!PageMappedToDisk(page)) {
-               if (unlikely(copied < len) && !page_has_buffers(page))
-                       attach_nobh_buffers(page, head);
-               if (page_has_buffers(page))
-                       return generic_write_end(file, mapping, pos, len,
-                                               copied, page, fsdata);
-       }
+       if (unlikely(copied < len) && !page_has_buffers(page))
+               attach_nobh_buffers(page, head);
+       if (page_has_buffers(page))
+               return generic_write_end(file, mapping, pos, len,
+                                       copied, page, fsdata);
 
        SetPageUptodate(page);
        set_page_dirty(page);