diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-05-23 19:57:31 (GMT) |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-23 19:57:31 (GMT) |
commit | a2ab67fae1ab9226679495a8d260f4e6555efc5f (patch) | |
tree | f7de683c9c8ff0869a7e11f1d40802145d05f5b4 /fs/buffer.c | |
parent | 6d0485a99366d4e0e7e725f14995c74cb7ca4499 (diff) | |
parent | 135cad366b4e7d6a79f6369f6cb5b721985aa62f (diff) | |
download | linux-a2ab67fae1ab9226679495a8d260f4e6555efc5f.tar.xz |
Merge branch 'for-rmk-devel' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Conflicts:
arch/arm/Kconfig
arch/arm/Makefile
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index b3e5be7..aed2977 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2397,7 +2397,8 @@ block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, if ((page->mapping != inode->i_mapping) || (page_offset(page) > size)) { /* page got truncated out from underneath us */ - goto out_unlock; + unlock_page(page); + goto out; } /* page is wholly or partially inside EOF */ @@ -2411,14 +2412,15 @@ block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, ret = block_commit_write(page, 0, end); if (unlikely(ret)) { + unlock_page(page); if (ret == -ENOMEM) ret = VM_FAULT_OOM; else /* -ENOSPC, -EIO, etc */ ret = VM_FAULT_SIGBUS; - } + } else + ret = VM_FAULT_LOCKED; -out_unlock: - unlock_page(page); +out: return ret; } |