Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128570
b: refs/heads/master
c: e9906a9
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 826e175 commit 9b78612
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 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: 6e3b96668eb34da6060a5189e6a73e9d62a3b178
refs/heads/master: e9906a98497c26a3c1a7532b51b81cc1fbdf9e1d
1 change: 1 addition & 0 deletions trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ struct file_operations btrfs_file_operations = {
.llseek = generic_file_llseek,
.read = do_sync_read,
.aio_read = generic_file_aio_read,
.splice_read = generic_file_splice_read,
.write = btrfs_file_write,
.mmap = btrfs_file_mmap,
.open = generic_file_open,
Expand Down
15 changes: 13 additions & 2 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1893,8 +1893,19 @@ static void btrfs_truncate(struct inode *inode)
int btrfs_commit_write(struct file *file, struct page *page,
unsigned from, unsigned to)
{
return extent_commit_write(&BTRFS_I(page->mapping->host)->extent_tree,
page->mapping->host, page, from, to);
loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
struct inode *inode = page->mapping->host;

btrfs_cow_one_page(inode, page, PAGE_CACHE_SIZE);

set_page_extent_mapped(page);
set_page_dirty(page);

if (pos > inode->i_size) {
i_size_write(inode, pos);
mark_inode_dirty(inode);
}
return 0;
}

static int create_subvol(struct btrfs_root *root, char *name, int namelen)
Expand Down

0 comments on commit 9b78612

Please sign in to comment.