diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-04-14 22:54:21 -0400 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-04-14 22:54:21 -0400 |
commit | 3ec10cd8b526c6b10170c2649002672ee2019e73 (patch) | |
tree | 27e3fb26020877ae43d3bcc5996c058957df3dc3 /fs/ecryptfs/mmap.c | |
parent | 993916203f00e8c62599466a5caa866e09f0fae3 (diff) | |
parent | 1be99f6c95e6c887756f789a60d15771235acd0c (diff) |
Merge commit 'v2.6.38.3' into linaro-2.6.38
Diffstat (limited to 'fs/ecryptfs/mmap.c')
-rw-r--r-- | fs/ecryptfs/mmap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c index cc64fca89f8..eb9d9672ebd 100644 --- a/fs/ecryptfs/mmap.c +++ b/fs/ecryptfs/mmap.c @@ -374,6 +374,11 @@ static int ecryptfs_write_begin(struct file *file, && (pos != 0)) zero_user(page, 0, PAGE_CACHE_SIZE); out: + if (unlikely(rc)) { + unlock_page(page); + page_cache_release(page); + *pagep = NULL; + } return rc; } |