[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110727003508.422A92403FF@tassilo.jf.intel.com>
Date: Tue, 26 Jul 2011 17:35:08 -0700 (PDT)
From: Andi Kleen <andi@...stfloor.org>
To: jlayton@...hat.com, Trond.Myklebust@...app.com, gregkh@...e.de,
ak@...ux.intel.com, linux-kernel@...r.kernel.org,
stable@...nel.org, tim.bird@...sony.com,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: [PATCH] [16/98] nfs: don't lose MS_SYNCHRONOUS on remount of noac mount
2.6.35-longterm review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <jlayton@...hat.com>
commit 26c4c170731f00008f4317a2888a0a07ac99d90d upstream.
On a remount, the VFS layer will clear the MS_SYNCHRONOUS bit on the
assumption that the flags on the mount syscall will have it set if the
remounted fs is supposed to keep it.
In the case of "noac" though, MS_SYNCHRONOUS is implied. A remount of
such a mount will lose the MS_SYNCHRONOUS flag since "sync" isn't part
of the mount options.
Reported-by: Max Matveev <makc@...hat.com>
Signed-off-by: Jeff Layton <jlayton@...hat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@...app.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
fs/nfs/super.c | 9 +++++++++
1 file changed, 9 insertions(+)
Index: linux-2.6.35.y/fs/nfs/super.c
===================================================================
--- linux-2.6.35.y.orig/fs/nfs/super.c
+++ linux-2.6.35.y/fs/nfs/super.c
@@ -2001,6 +2001,15 @@ nfs_remount(struct super_block *sb, int
if (error < 0)
goto out;
+ /*
+ * noac is a special case. It implies -o sync, but that's not
+ * necessarily reflected in the mtab options. do_remount_sb
+ * will clear MS_SYNCHRONOUS if -o sync wasn't specified in the
+ * remount options, so we have to explicitly reset it.
+ */
+ if (data->flags & NFS_MOUNT_NOAC)
+ *flags |= MS_SYNCHRONOUS;
+
/* compare new mount options with old ones */
error = nfs_compare_remount_data(nfss, data);
out:
--
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