From patchwork Mon Jun 10 22:04:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 250385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 437AD2C008F for ; Tue, 11 Jun 2013 08:05:09 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1UmAD1-0008QD-4k; Mon, 10 Jun 2013 22:05:03 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1UmACd-0008ID-7N for kernel-team@lists.ubuntu.com; Mon, 10 Jun 2013 22:04:39 +0000 Received: from c-67-160-231-42.hsd1.ca.comcast.net ([67.160.231.42] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1UmACd-0000AA-0W; Mon, 10 Jun 2013 22:04:39 +0000 Received: from kamal by fourier with local (Exim 4.80) (envelope-from ) id 1UmACa-0003Uw-UT; Mon, 10 Jun 2013 15:04:36 -0700 From: Kamal Mostafa To: Tyler Hicks Subject: [ 3.8.y.z extended stable ] Patch "eCryptfs: Check return of filemap_write_and_wait during fsync" has been added to staging queue Date: Mon, 10 Jun 2013 15:04:36 -0700 Message-Id: <1370901876-13413-1-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.8.1.2 X-Extended-Stable: 3.8 Cc: Olof Johansson , Paul Taysom , Kamal Mostafa , kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled eCryptfs: Check return of filemap_write_and_wait during fsync to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue This patch is scheduled to be released in version 3.8.13.3. If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.8.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Kamal ------ From b0f29967a3913f9fafed9d722828da2585cb32d2 Mon Sep 17 00:00:00 2001 From: Tyler Hicks Date: Tue, 4 Jun 2013 10:24:56 -0700 Subject: eCryptfs: Check return of filemap_write_and_wait during fsync commit bc5abcf7e411b889f73ea2a90439071a0f451011 upstream. Error out of ecryptfs_fsync() if filemap_write_and_wait() fails. Signed-off-by: Tyler Hicks Cc: Paul Taysom Cc: Olof Johansson Signed-off-by: Kamal Mostafa --- fs/ecryptfs/file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 1.8.1.2 diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 4f9a25e..9d5dd5c 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c @@ -296,7 +296,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); }