aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index aa433d077945..101f5f4c304f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1439,7 +1439,7 @@ int nfs4_do_close(struct path *path, struct nfs4_state *state, int wait)
1439 if (calldata->arg.seqid == NULL) 1439 if (calldata->arg.seqid == NULL)
1440 goto out_free_calldata; 1440 goto out_free_calldata;
1441 calldata->arg.fmode = 0; 1441 calldata->arg.fmode = 0;
1442 calldata->arg.bitmask = server->attr_bitmask; 1442 calldata->arg.bitmask = server->cache_consistency_bitmask;
1443 calldata->res.fattr = &calldata->fattr; 1443 calldata->res.fattr = &calldata->fattr;
1444 calldata->res.seqid = calldata->arg.seqid; 1444 calldata->res.seqid = calldata->arg.seqid;
1445 calldata->res.server = server; 1445 calldata->res.server = server;
@@ -1600,6 +1600,9 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
1600 server->caps |= NFS_CAP_HARDLINKS; 1600 server->caps |= NFS_CAP_HARDLINKS;
1601 if (res.has_symlinks != 0) 1601 if (res.has_symlinks != 0)
1602 server->caps |= NFS_CAP_SYMLINKS; 1602 server->caps |= NFS_CAP_SYMLINKS;
1603 memcpy(server->cache_consistency_bitmask, res.attr_bitmask, sizeof(server->cache_consistency_bitmask));
1604 server->cache_consistency_bitmask[0] &= FATTR4_WORD0_CHANGE|FATTR4_WORD0_SIZE;
1605 server->cache_consistency_bitmask[1] &= FATTR4_WORD1_TIME_METADATA|FATTR4_WORD1_TIME_MODIFY;
1603 server->acl_bitmask = res.acl_bitmask; 1606 server->acl_bitmask = res.acl_bitmask;
1604 } 1607 }
1605 return status; 1608 return status;
@@ -2079,7 +2082,7 @@ static void nfs4_proc_unlink_setup(struct rpc_message *msg, struct inode *dir)
2079 struct nfs_removeargs *args = msg->rpc_argp; 2082 struct nfs_removeargs *args = msg->rpc_argp;
2080 struct nfs_removeres *res = msg->rpc_resp; 2083 struct nfs_removeres *res = msg->rpc_resp;
2081 2084
2082 args->bitmask = server->attr_bitmask; 2085 args->bitmask = server->cache_consistency_bitmask;
2083 res->server = server; 2086 res->server = server;
2084 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_REMOVE]; 2087 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_REMOVE];
2085} 2088}
@@ -2323,7 +2326,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
2323 .pages = &page, 2326 .pages = &page,
2324 .pgbase = 0, 2327 .pgbase = 0,
2325 .count = count, 2328 .count = count,
2326 .bitmask = NFS_SERVER(dentry->d_inode)->attr_bitmask, 2329 .bitmask = NFS_SERVER(dentry->d_inode)->cache_consistency_bitmask,
2327 }; 2330 };
2328 struct nfs4_readdir_res res; 2331 struct nfs4_readdir_res res;
2329 struct rpc_message msg = { 2332 struct rpc_message msg = {
@@ -2552,7 +2555,7 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag
2552{ 2555{
2553 struct nfs_server *server = NFS_SERVER(data->inode); 2556 struct nfs_server *server = NFS_SERVER(data->inode);
2554 2557
2555 data->args.bitmask = server->attr_bitmask; 2558 data->args.bitmask = server->cache_consistency_bitmask;
2556 data->res.server = server; 2559 data->res.server = server;
2557 data->timestamp = jiffies; 2560 data->timestamp = jiffies;
2558 2561
@@ -2575,7 +2578,7 @@ static void nfs4_proc_commit_setup(struct nfs_write_data *data, struct rpc_messa
2575{ 2578{
2576 struct nfs_server *server = NFS_SERVER(data->inode); 2579 struct nfs_server *server = NFS_SERVER(data->inode);
2577 2580
2578 data->args.bitmask = server->attr_bitmask; 2581 data->args.bitmask = server->cache_consistency_bitmask;
2579 data->res.server = server; 2582 data->res.server = server;
2580 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMMIT]; 2583 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMMIT];
2581} 2584}