projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24a923e
)
eCryptfs: Check return of filemap_write_and_wait during fsync
author
Tyler Hicks
<
[email protected]
>
Tue, 4 Jun 2013 17:24:56 +0000
(10:24 -0700)
committer
Tyler Hicks
<
[email protected]
>
Wed, 5 Jun 2013 06:53:31 +0000
(23:53 -0700)
Error out of ecryptfs_fsync() if filemap_write_and_wait() fails.
Signed-off-by: Tyler Hicks <
[email protected]
>
Cc: Paul Taysom <
[email protected]
>
Cc: Olof Johansson <
[email protected]
>
Cc:
[email protected]
# v3.6+
fs/ecryptfs/file.c
patch
|
blob
|
history
diff --git
a/fs/ecryptfs/file.c
b/fs/ecryptfs/file.c
index 16f509d6fa4957930670d1b245195b0591ac4df8..a7abbea2c09638ef8c190555ec466834c0c06edf 100644
(file)
--- a/
fs/ecryptfs/file.c
+++ b/
fs/ecryptfs/file.c
@@
-295,7
+295,12
@@
static int ecryptfs_release(struct inode *inode, struct file *file)
static int
ecryptfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
{
- filemap_write_and_wait(file->f_mapping);
+ int rc;
+
+ rc = filemap_write_and_wait(file->f_mapping);
+ if (rc)
+ return rc;
+
return vfs_fsync(ecryptfs_file_to_lower(file), datasync);
}