aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/filelayout/filelayout.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/filelayout/filelayout.c')
-rw-r--r--fs/nfs/filelayout/filelayout.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index 508126eb49f9..4e54d8b5413a 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -471,10 +471,10 @@ filelayout_read_pagelist(struct nfs_pgio_header *hdr)
471 return PNFS_NOT_ATTEMPTED; 471 return PNFS_NOT_ATTEMPTED;
472 472
473 dprintk("%s USE DS: %s cl_count %d\n", __func__, 473 dprintk("%s USE DS: %s cl_count %d\n", __func__,
474 ds->ds_remotestr, atomic_read(&ds->ds_clp->cl_count)); 474 ds->ds_remotestr, refcount_read(&ds->ds_clp->cl_count));
475 475
476 /* No multipath support. Use first DS */ 476 /* No multipath support. Use first DS */
477 atomic_inc(&ds->ds_clp->cl_count); 477 refcount_inc(&ds->ds_clp->cl_count);
478 hdr->ds_clp = ds->ds_clp; 478 hdr->ds_clp = ds->ds_clp;
479 hdr->ds_commit_idx = idx; 479 hdr->ds_commit_idx = idx;
480 fh = nfs4_fl_select_ds_fh(lseg, j); 480 fh = nfs4_fl_select_ds_fh(lseg, j);
@@ -515,10 +515,10 @@ filelayout_write_pagelist(struct nfs_pgio_header *hdr, int sync)
515 515
516 dprintk("%s ino %lu sync %d req %zu@%llu DS: %s cl_count %d\n", 516 dprintk("%s ino %lu sync %d req %zu@%llu DS: %s cl_count %d\n",
517 __func__, hdr->inode->i_ino, sync, (size_t) hdr->args.count, 517 __func__, hdr->inode->i_ino, sync, (size_t) hdr->args.count,
518 offset, ds->ds_remotestr, atomic_read(&ds->ds_clp->cl_count)); 518 offset, ds->ds_remotestr, refcount_read(&ds->ds_clp->cl_count));
519 519
520 hdr->pgio_done_cb = filelayout_write_done_cb; 520 hdr->pgio_done_cb = filelayout_write_done_cb;
521 atomic_inc(&ds->ds_clp->cl_count); 521 refcount_inc(&ds->ds_clp->cl_count);
522 hdr->ds_clp = ds->ds_clp; 522 hdr->ds_clp = ds->ds_clp;
523 hdr->ds_commit_idx = idx; 523 hdr->ds_commit_idx = idx;
524 fh = nfs4_fl_select_ds_fh(lseg, j); 524 fh = nfs4_fl_select_ds_fh(lseg, j);
@@ -1064,9 +1064,9 @@ static int filelayout_initiate_commit(struct nfs_commit_data *data, int how)
1064 goto out_err; 1064 goto out_err;
1065 1065
1066 dprintk("%s ino %lu, how %d cl_count %d\n", __func__, 1066 dprintk("%s ino %lu, how %d cl_count %d\n", __func__,
1067 data->inode->i_ino, how, atomic_read(&ds->ds_clp->cl_count)); 1067 data->inode->i_ino, how, refcount_read(&ds->ds_clp->cl_count));
1068 data->commit_done_cb = filelayout_commit_done_cb; 1068 data->commit_done_cb = filelayout_commit_done_cb;
1069 atomic_inc(&ds->ds_clp->cl_count); 1069 refcount_inc(&ds->ds_clp->cl_count);
1070 data->ds_clp = ds->ds_clp; 1070 data->ds_clp = ds->ds_clp;
1071 fh = select_ds_fh_from_commit(lseg, data->ds_commit_index); 1071 fh = select_ds_fh_from_commit(lseg, data->ds_commit_index);
1072 if (fh) 1072 if (fh)