Skip to content

Commit

Permalink
pnfsblock: use list_move_tail instead of list_del/list_add_tail
Browse files Browse the repository at this point in the history
Using list_move_tail() instead of list_del() + list_add_tail().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Wei Yongjun authored and Trond Myklebust committed Oct 1, 2012
1 parent 96c9eae commit 4e26622
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/nfs/blocklayout/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,7 @@ encode_pnfs_block_layoutupdate(struct pnfs_block_layout *bl,
p = xdr_encode_hyper(p, lce->bse_length << SECTOR_SHIFT);
p = xdr_encode_hyper(p, 0LL);
*p++ = cpu_to_be32(PNFS_BLOCK_READWRITE_DATA);
list_del(&lce->bse_node);
list_add_tail(&lce->bse_node, &bl->bl_committing);
list_move_tail(&lce->bse_node, &bl->bl_committing);
bl->bl_count--;
count++;
}
Expand Down

0 comments on commit 4e26622

Please sign in to comment.