Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87894
b: refs/heads/master
c: 5b41e74
h: refs/heads/master
v: v3
  • Loading branch information
Dmitri Monakhov authored and Linus Torvalds committed Mar 28, 2008
1 parent b278224 commit 37cea25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d4a788f15302877ff2cb08f22009e290a36a209
refs/heads/master: 5b41e74ad1b0bf7bc51765ae74e5dc564afc3e48
13 changes: 6 additions & 7 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 37cea25

Please sign in to comment.