diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-04-27 11:49:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-09 16:04:40 -0700 |
commit | ef0a7cb84462c4ee1e9870a5730de6975f55523b (patch) | |
tree | 710b7aa85a0804546691584f30e8c8f9c7254358 /fs | |
parent | 68dbff17ec5f7c19b68dd9a7ae1d02cde05aafaa (diff) | |
download | kernel-common-ef0a7cb84462c4ee1e9870a5730de6975f55523b.tar.gz kernel-common-ef0a7cb84462c4ee1e9870a5730de6975f55523b.tar.bz2 kernel-common-ef0a7cb84462c4ee1e9870a5730de6975f55523b.zip |
nfs: don't lose MS_SYNCHRONOUS on remount of noac mount
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@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/super.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 912e61fb37d9..a032ec00dbb5 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1981,6 +1981,15 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) 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: |