Skip to content

Commit

Permalink
pnfs: Increase the refcount when LAYOUTGET fails the first time
Browse files Browse the repository at this point in the history
The layout will be set unusable if LAYOUTGET fails. Is it reasonable to
increase the refcount iff LAYOUTGET fails the first time?

Signed-off-by: Yanchuan Nian <ycnian@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org [>= 3.7]
  • Loading branch information
ycnian authored and Trond Myklebust committed Jan 4, 2013
1 parent f8d9a89 commit 39e88fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static void
pnfs_layout_set_fail_bit(struct pnfs_layout_hdr *lo, int fail_bit)
{
lo->plh_retry_timestamp = jiffies;
if (test_and_set_bit(fail_bit, &lo->plh_flags))
if (!test_and_set_bit(fail_bit, &lo->plh_flags))
atomic_inc(&lo->plh_refcount);
}

Expand Down

0 comments on commit 39e88fc

Please sign in to comment.