aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/callback_proc.c2
-rw-r--r--fs/nfs/nfs4proc.c5
-rw-r--r--fs/nfs/pnfs.c4
-rw-r--r--include/linux/nfs_fs_sb.h1
-rw-r--r--include/linux/nfs_xdr.h1
5 files changed, 3 insertions, 10 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index efca3d6c89f2..43ba390bb653 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -331,8 +331,6 @@ static u32 initiate_bulk_draining(struct nfs_client *clp,
331static u32 do_callback_layoutrecall(struct nfs_client *clp, 331static u32 do_callback_layoutrecall(struct nfs_client *clp,
332 struct cb_layoutrecallargs *args) 332 struct cb_layoutrecallargs *args)
333{ 333{
334 write_seqcount_begin(&clp->cl_callback_count);
335 write_seqcount_end(&clp->cl_callback_count);
336 if (args->cbl_recall_type == RETURN_FILE) 334 if (args->cbl_recall_type == RETURN_FILE)
337 return initiate_file_draining(clp, args); 335 return initiate_file_draining(clp, args);
338 return initiate_bulk_draining(clp, args); 336 return initiate_bulk_draining(clp, args);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 6dd146885da9..5a8190ec31a2 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2843,6 +2843,9 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
2843 nfs_save_change_attribute(d_inode(opendata->dir))); 2843 nfs_save_change_attribute(d_inode(opendata->dir)));
2844 } 2844 }
2845 2845
2846 /* Parse layoutget results before we check for access */
2847 pnfs_parse_lgopen(state->inode, opendata->lgp, ctx);
2848
2846 ret = nfs4_opendata_access(sp->so_cred, opendata, state, fmode, flags); 2849 ret = nfs4_opendata_access(sp->so_cred, opendata, state, fmode, flags);
2847 if (ret != 0) 2850 if (ret != 0)
2848 goto out; 2851 goto out;
@@ -2851,8 +2854,6 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
2851 nfs_inode_attach_open_context(ctx); 2854 nfs_inode_attach_open_context(ctx);
2852 if (read_seqcount_retry(&sp->so_reclaim_seqcount, seq)) 2855 if (read_seqcount_retry(&sp->so_reclaim_seqcount, seq))
2853 nfs4_schedule_stateid_recovery(server, state); 2856 nfs4_schedule_stateid_recovery(server, state);
2854 else
2855 pnfs_parse_lgopen(state->inode, opendata->lgp, ctx);
2856 } 2857 }
2857 2858
2858out: 2859out:
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 030c39c107c2..7fdac8b504dd 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1018,7 +1018,6 @@ pnfs_alloc_init_layoutget_args(struct inode *ino,
1018 nfs4_stateid_copy(&lgp->args.stateid, stateid); 1018 nfs4_stateid_copy(&lgp->args.stateid, stateid);
1019 lgp->gfp_flags = gfp_flags; 1019 lgp->gfp_flags = gfp_flags;
1020 lgp->cred = get_rpccred(ctx->cred); 1020 lgp->cred = get_rpccred(ctx->cred);
1021 lgp->callback_count = raw_seqcount_begin(&server->nfs_client->cl_callback_count);
1022 return lgp; 1021 return lgp;
1023} 1022}
1024 1023
@@ -2181,9 +2180,6 @@ void pnfs_parse_lgopen(struct inode *ino, struct nfs4_layoutget *lgp,
2181 } else 2180 } else
2182 lo = NFS_I(lgp->args.inode)->layout; 2181 lo = NFS_I(lgp->args.inode)->layout;
2183 2182
2184 if (read_seqcount_retry(&srv->nfs_client->cl_callback_count,
2185 lgp->callback_count))
2186 return;
2187 lseg = pnfs_layout_process(lgp); 2183 lseg = pnfs_layout_process(lgp);
2188 if (!IS_ERR(lseg)) { 2184 if (!IS_ERR(lseg)) {
2189 iomode = lgp->args.range.iomode; 2185 iomode = lgp->args.range.iomode;
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 74ae3e1d19a0..2c18d618604e 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -28,7 +28,6 @@ struct nfs41_impl_id;
28struct nfs_client { 28struct nfs_client {
29 refcount_t cl_count; 29 refcount_t cl_count;
30 atomic_t cl_mds_count; 30 atomic_t cl_mds_count;
31 seqcount_t cl_callback_count;
32 int cl_cons_state; /* current construction state (-ve: init error) */ 31 int cl_cons_state; /* current construction state (-ve: init error) */
33#define NFS_CS_READY 0 /* ready to be used */ 32#define NFS_CS_READY 0 /* ready to be used */
34#define NFS_CS_INITING 1 /* busy initialising */ 33#define NFS_CS_INITING 1 /* busy initialising */
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 712eed156d09..3b7325cfb291 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -271,7 +271,6 @@ struct nfs4_layoutget {
271 struct nfs4_layoutget_args args; 271 struct nfs4_layoutget_args args;
272 struct nfs4_layoutget_res res; 272 struct nfs4_layoutget_res res;
273 struct rpc_cred *cred; 273 struct rpc_cred *cred;
274 unsigned callback_count;
275 gfp_t gfp_flags; 274 gfp_t gfp_flags;
276}; 275};
277 276