]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pNFS: Remove redundant pnfs_mark_layout_returned_if_empty()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 24 Jul 2016 16:45:47 +0000 (12:45 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 24 Jul 2016 20:16:41 +0000 (16:16 -0400)
That's already being taken care of in pnfs_layout_remove_lseg().

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/callback_proc.c
fs/nfs/nfs4proc.c
fs/nfs/pnfs.c
fs/nfs/pnfs.h

index 837da8a02d3596741dfe572c4ee637f553b94a84..c92a75e066a6f75828079f422c2546ea73a90415 100644 (file)
@@ -252,7 +252,6 @@ static u32 initiate_file_draining(struct nfs_client *clp,
                NFS_SERVER(ino)->pnfs_curr_ld->return_range(lo,
                        &args->cbl_range);
        }
-       pnfs_mark_layout_returned_if_empty(lo);
 unlock:
        spin_unlock(&ino->i_lock);
        pnfs_free_lseg_list(&free_me_list);
index 8c453515d98c4c598ff5513d06578096869ebe9d..d38cc5f0282fc7b5d720e6e8a66cd141071f2319 100644 (file)
@@ -8128,7 +8128,6 @@ static void nfs4_layoutreturn_release(void *calldata)
        spin_lock(&lo->plh_inode->i_lock);
        pnfs_mark_matching_lsegs_invalid(lo, &freeme, &lrp->args.range,
                        be32_to_cpu(lrp->args.stateid.seqid));
-       pnfs_mark_layout_returned_if_empty(lo);
        if (lrp->res.lrs_present && pnfs_layout_is_valid(lo))
                pnfs_set_layout_stateid(lo, &lrp->res.stateid, true);
        pnfs_clear_layoutreturn_waitbit(lo);
index e16997da157fe633d0ca5efb7e4bc2caecbf0f67..49e952968edee1d797fc4520d458ff2c87be236f 100644 (file)
@@ -1159,7 +1159,6 @@ void pnfs_roc_set_barrier(struct inode *ino, u32 barrier)
 
        spin_lock(&ino->i_lock);
        lo = NFS_I(ino)->layout;
-       pnfs_mark_layout_returned_if_empty(lo);
        if (pnfs_seqid_is_newer(barrier, lo->plh_barrier))
                lo->plh_barrier = barrier;
        spin_unlock(&ino->i_lock);
index d71c9493693ac871dc3e4f0db205caa82bf490b9..595648a3ad7a52efd0f36c9f80ac9db3b0d56220 100644 (file)
@@ -552,19 +552,6 @@ pnfs_calc_offset_length(u64 offset, u64 end)
        return 1 + end - offset;
 }
 
-/**
- * pnfs_mark_layout_returned_if_empty - marks the layout as returned
- * @lo: layout header
- *
- * Note: Caller must hold inode->i_lock
- */
-static inline void
-pnfs_mark_layout_returned_if_empty(struct pnfs_layout_hdr *lo)
-{
-       if (list_empty(&lo->plh_segs))
-               set_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags);
-}
-
 static inline void
 pnfs_copy_range(struct pnfs_layout_range *dst,
                const struct pnfs_layout_range *src)