diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-24 12:45:47 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-24 16:16:41 -0400 |
commit | f71dfe8fc947e04a9e3d10723d4ec4c5c44ce0f5 (patch) | |
tree | 1549ee274eb1b1b88e5c13f65d9a97302373b87c /fs/nfs | |
parent | d9b61708fe6dcab7b50abfb87cb47690d00269a1 (diff) |
pNFS: Remove redundant pnfs_mark_layout_returned_if_empty()
That's already being taken care of in pnfs_layout_remove_lseg().
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/callback_proc.c | 1 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 1 | ||||
-rw-r--r-- | fs/nfs/pnfs.c | 1 | ||||
-rw-r--r-- | fs/nfs/pnfs.h | 13 |
4 files changed, 0 insertions, 16 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 837da8a02d35..c92a75e066a6 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
@@ -252,7 +252,6 @@ static u32 initiate_file_draining(struct nfs_client *clp, | |||
252 | NFS_SERVER(ino)->pnfs_curr_ld->return_range(lo, | 252 | NFS_SERVER(ino)->pnfs_curr_ld->return_range(lo, |
253 | &args->cbl_range); | 253 | &args->cbl_range); |
254 | } | 254 | } |
255 | pnfs_mark_layout_returned_if_empty(lo); | ||
256 | unlock: | 255 | unlock: |
257 | spin_unlock(&ino->i_lock); | 256 | spin_unlock(&ino->i_lock); |
258 | pnfs_free_lseg_list(&free_me_list); | 257 | pnfs_free_lseg_list(&free_me_list); |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 8c453515d98c..d38cc5f0282f 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -8128,7 +8128,6 @@ static void nfs4_layoutreturn_release(void *calldata) | |||
8128 | spin_lock(&lo->plh_inode->i_lock); | 8128 | spin_lock(&lo->plh_inode->i_lock); |
8129 | pnfs_mark_matching_lsegs_invalid(lo, &freeme, &lrp->args.range, | 8129 | pnfs_mark_matching_lsegs_invalid(lo, &freeme, &lrp->args.range, |
8130 | be32_to_cpu(lrp->args.stateid.seqid)); | 8130 | be32_to_cpu(lrp->args.stateid.seqid)); |
8131 | pnfs_mark_layout_returned_if_empty(lo); | ||
8132 | if (lrp->res.lrs_present && pnfs_layout_is_valid(lo)) | 8131 | if (lrp->res.lrs_present && pnfs_layout_is_valid(lo)) |
8133 | pnfs_set_layout_stateid(lo, &lrp->res.stateid, true); | 8132 | pnfs_set_layout_stateid(lo, &lrp->res.stateid, true); |
8134 | pnfs_clear_layoutreturn_waitbit(lo); | 8133 | pnfs_clear_layoutreturn_waitbit(lo); |
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index e16997da157f..49e952968ede 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -1159,7 +1159,6 @@ void pnfs_roc_set_barrier(struct inode *ino, u32 barrier) | |||
1159 | 1159 | ||
1160 | spin_lock(&ino->i_lock); | 1160 | spin_lock(&ino->i_lock); |
1161 | lo = NFS_I(ino)->layout; | 1161 | lo = NFS_I(ino)->layout; |
1162 | pnfs_mark_layout_returned_if_empty(lo); | ||
1163 | if (pnfs_seqid_is_newer(barrier, lo->plh_barrier)) | 1162 | if (pnfs_seqid_is_newer(barrier, lo->plh_barrier)) |
1164 | lo->plh_barrier = barrier; | 1163 | lo->plh_barrier = barrier; |
1165 | spin_unlock(&ino->i_lock); | 1164 | spin_unlock(&ino->i_lock); |
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index d71c9493693a..595648a3ad7a 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -552,19 +552,6 @@ pnfs_calc_offset_length(u64 offset, u64 end) | |||
552 | return 1 + end - offset; | 552 | return 1 + end - offset; |
553 | } | 553 | } |
554 | 554 | ||
555 | /** | ||
556 | * pnfs_mark_layout_returned_if_empty - marks the layout as returned | ||
557 | * @lo: layout header | ||
558 | * | ||
559 | * Note: Caller must hold inode->i_lock | ||
560 | */ | ||
561 | static inline void | ||
562 | pnfs_mark_layout_returned_if_empty(struct pnfs_layout_hdr *lo) | ||
563 | { | ||
564 | if (list_empty(&lo->plh_segs)) | ||
565 | set_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags); | ||
566 | } | ||
567 | |||
568 | static inline void | 555 | static inline void |
569 | pnfs_copy_range(struct pnfs_layout_range *dst, | 556 | pnfs_copy_range(struct pnfs_layout_range *dst, |
570 | const struct pnfs_layout_range *src) | 557 | const struct pnfs_layout_range *src) |