[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130611195322.800333846@linuxfoundation.org>
Date: Tue, 11 Jun 2013 13:03:17 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Tyler Hicks <tyhicks@...onical.com>,
Paul Taysom <taysom@...omium.org>,
Olof Johansson <olofj@...omium.org>
Subject: [ 51/79] eCryptfs: Check return of filemap_write_and_wait during fsync
3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tyler Hicks <tyhicks@...onical.com>
commit bc5abcf7e411b889f73ea2a90439071a0f451011 upstream.
Error out of ecryptfs_fsync() if filemap_write_and_wait() fails.
Signed-off-by: Tyler Hicks <tyhicks@...onical.com>
Cc: Paul Taysom <taysom@...omium.org>
Cc: Olof Johansson <olofj@...omium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
fs/ecryptfs/file.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -294,7 +294,12 @@ static int ecryptfs_release(struct inode
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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists