diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-14 13:13:25 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-14 13:13:25 +0000 |
commit | 7d9aca39dcacd2b3f42e2e287162329f410f93e1 (patch) | |
tree | 2907b680b2b7625226f46d23d74ccc9c58ad0362 /fs/btrfs/inode.c | |
parent | e1c1c69c8fc7656c33460c8e085ac0d0be22ac3b (diff) | |
parent | a0cc0209abb9fe2b9ab71aa41be70eddd0cbdd61 (diff) | |
download | op-kernel-dev-7d9aca39dcacd2b3f42e2e287162329f410f93e1.zip op-kernel-dev-7d9aca39dcacd2b3f42e2e287162329f410f93e1.tar.gz |
Merge remote-tracking branch 'regmap/topic/drivers' into regmap-next
Resolved simple add/add conflicts:
drivers/base/regmap/internal.h
drivers/base/regmap/regmap.c
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0da19a0..32214fe 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6401,18 +6401,23 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) unsigned long zero_start; loff_t size; int ret; + int reserved = 0; u64 page_start; u64 page_end; ret = btrfs_delalloc_reserve_space(inode, PAGE_CACHE_SIZE); - if (!ret) + if (!ret) { ret = btrfs_update_time(vma->vm_file); + reserved = 1; + } if (ret) { if (ret == -ENOMEM) ret = VM_FAULT_OOM; else /* -ENOSPC, -EIO, etc */ ret = VM_FAULT_SIGBUS; - goto out; + if (reserved) + goto out; + goto out_noreserve; } ret = VM_FAULT_NOPAGE; /* make the VM retry the fault */ @@ -6495,6 +6500,7 @@ out_unlock: unlock_page(page); out: btrfs_delalloc_release_space(inode, PAGE_CACHE_SIZE); +out_noreserve: return ret; } |