diff options
author | Benjamin Coddington <bcodding@redhat.com> | 2024-04-17 14:49:29 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2024-05-20 11:12:59 -0400 |
commit | 37ffe06537af3e3ec212e7cbe941046fce0a822f (patch) | |
tree | bbf1f423114b7f6096db9292b122eb90afaec9cf /scripts/gdb/linux/tasks.py | |
parent | bf95f82e6a569f41bae1e37204b219a5e1e8b971 (diff) |
NFSv4: Fixup smatch warning for ambiguous return
Dan Carpenter reports smatch warning for nfs4_try_migration() when a memory
allocation failure results in a zero return value. In this case, a
transient allocation failure error will likely be retried the next time the
server responds with NFS4ERR_MOVED.
We can fixup the smatch warning with a small refactor: attempt all three
allocations before testing and returning on a failure.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: c3ed222745d9 ("NFSv4: Fix free of uninitialized nfs4_label on referral lookup.")
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions