mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
NFSD: Lock state before calling fault injection function
Each function touches state in some way, so getting the lock earlier can help simplify code. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
e5f9570319
commit
043958395a
2 changed files with 4 additions and 16 deletions
|
@ -51,7 +51,9 @@ static int nfsd_inject_set(void *op_ptr, u64 val)
|
|||
else
|
||||
printk(KERN_INFO "NFSD Fault Injection: %s (n = %llu)", op->file, val);
|
||||
|
||||
nfs4_lock_state();
|
||||
op->func(val);
|
||||
nfs4_unlock_state();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue