linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfs: Set s_time_gran consistently on NFSv2
@ 2016-09-12 11:16 Andreas Gruenbacher
  2016-09-12 12:18 ` Trond Myklebust
  2016-09-12 12:32 ` kbuild test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Gruenbacher @ 2016-09-12 11:16 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker; +Cc: Andreas Gruenbacher, linux-nfs

Hi Trond and Anna,

is it true that nfs_clone_super accidentally sets s_time_gran to 1 on NFSv2?
If so, could you please merge the following patch?

Thanks,
Andreas

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 fs/nfs/super.c | 25 +++++++++----------------
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index d396013..4c72fec 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2312,6 +2312,15 @@ inline void nfs_initialise_sb(struct super_block *sb)
 {
 	struct nfs_server *server = NFS_SB(sb);
 
+	if (server->nfs_client->rpc_ops->version != 2) {
+		sb->s_time_gran = 1;
+		/*
+		 * The VFS shouldn't apply the umask to mode bits. We will do
+		 * so ourselves when necessary.
+		 */
+		sb->s_flags |= MS_POSIXACL;
+	}
+
 	sb->s_magic = NFS_SUPER_MAGIC;
 
 	/* We probably want something more informative here */
@@ -2342,14 +2351,6 @@ void nfs_fill_super(struct super_block *sb, struct nfs_mount_info *mount_info)
 	if (data && data->bsize)
 		sb->s_blocksize = nfs_block_size(data->bsize, &sb->s_blocksize_bits);
 
-	if (server->nfs_client->rpc_ops->version != 2) {
-		/* The VFS shouldn't apply the umask to mode bits. We will do
-		 * so ourselves when necessary.
-		 */
-		sb->s_flags |= MS_POSIXACL;
-		sb->s_time_gran = 1;
-	}
-
  	nfs_initialise_sb(sb);
 }
 EXPORT_SYMBOL_GPL(nfs_fill_super);
@@ -2367,14 +2368,6 @@ void nfs_clone_super(struct super_block *sb, struct nfs_mount_info *mount_info)
 	sb->s_maxbytes = old_sb->s_maxbytes;
 	sb->s_xattr = old_sb->s_xattr;
 	sb->s_op = old_sb->s_op;
-	sb->s_time_gran = 1;
-
-	if (server->nfs_client->rpc_ops->version != 2) {
-		/* The VFS shouldn't apply the umask to mode bits. We will do
-		 * so ourselves when necessary.
-		 */
-		sb->s_flags |= MS_POSIXACL;
-	}
 
  	nfs_initialise_sb(sb);
 }
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-12 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 11:16 [PATCH] nfs: Set s_time_gran consistently on NFSv2 Andreas Gruenbacher
2016-09-12 12:18 ` Trond Myklebust
2016-09-12 12:32 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).