|
@@ -2688,7 +2688,7 @@ int nobh_write_end(struct file *file, struct address_space *mapping,
|
|
struct buffer_head *bh;
|
|
struct buffer_head *bh;
|
|
BUG_ON(fsdata != NULL && page_has_buffers(page));
|
|
BUG_ON(fsdata != NULL && page_has_buffers(page));
|
|
|
|
|
|
- if (unlikely(copied < len) && !page_has_buffers(page))
|
|
|
|
|
|
+ if (unlikely(copied < len) && head)
|
|
attach_nobh_buffers(page, head);
|
|
attach_nobh_buffers(page, head);
|
|
if (page_has_buffers(page))
|
|
if (page_has_buffers(page))
|
|
return generic_write_end(file, mapping, pos, len,
|
|
return generic_write_end(file, mapping, pos, len,
|