mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 18:43:33 -05:00
pnfs: Increase the refcount when LAYOUTGET fails the first time
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]
This commit is contained in:
parent
f8d9a897d4
commit
39e88fcfb1
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue