summaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 703f595dce90..19a76cfa8b1f 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2382,6 +2382,15 @@ void nfs_fill_super(struct super_block *sb, struct nfs_mount_info *mount_info)
2382 sb->s_flags |= SB_POSIXACL; 2382 sb->s_flags |= SB_POSIXACL;
2383 sb->s_time_gran = 1; 2383 sb->s_time_gran = 1;
2384 sb->s_export_op = &nfs_export_ops; 2384 sb->s_export_op = &nfs_export_ops;
2385 } else
2386 sb->s_time_gran = 1000;
2387
2388 if (server->nfs_client->rpc_ops->version != 4) {
2389 sb->s_time_min = 0;
2390 sb->s_time_max = U32_MAX;
2391 } else {
2392 sb->s_time_min = S64_MIN;
2393 sb->s_time_max = S64_MAX;
2385 } 2394 }
2386 2395
2387 nfs_initialise_sb(sb); 2396 nfs_initialise_sb(sb);
@@ -2402,7 +2411,6 @@ static void nfs_clone_super(struct super_block *sb,
2402 sb->s_maxbytes = old_sb->s_maxbytes; 2411 sb->s_maxbytes = old_sb->s_maxbytes;
2403 sb->s_xattr = old_sb->s_xattr; 2412 sb->s_xattr = old_sb->s_xattr;
2404 sb->s_op = old_sb->s_op; 2413 sb->s_op = old_sb->s_op;
2405 sb->s_time_gran = 1;
2406 sb->s_export_op = old_sb->s_export_op; 2414 sb->s_export_op = old_sb->s_export_op;
2407 2415
2408 if (server->nfs_client->rpc_ops->version != 2) { 2416 if (server->nfs_client->rpc_ops->version != 2) {
@@ -2410,6 +2418,16 @@ static void nfs_clone_super(struct super_block *sb,
2410 * so ourselves when necessary. 2418 * so ourselves when necessary.
2411 */ 2419 */
2412 sb->s_flags |= SB_POSIXACL; 2420 sb->s_flags |= SB_POSIXACL;
2421 sb->s_time_gran = 1;
2422 } else
2423 sb->s_time_gran = 1000;
2424
2425 if (server->nfs_client->rpc_ops->version != 4) {
2426 sb->s_time_min = 0;
2427 sb->s_time_max = U32_MAX;
2428 } else {
2429 sb->s_time_min = S64_MIN;
2430 sb->s_time_max = S64_MAX;
2413 } 2431 }
2414 2432
2415 nfs_initialise_sb(sb); 2433 nfs_initialise_sb(sb);