gfapi: handle failures in graph switches
A graph switch failure can potentially result in NULL returned for glfs_active_subvol(). Handle this gracefully in glfs_subvol_done() Change-Id: I6adbd878c354b9ed2314fc71cea4671792efa0a4 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5407 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
parent
c6b8143b9f
commit
aa70c0bba0
@ -797,6 +797,9 @@ glfs_subvol_done (struct glfs *fs, xlator_t *subvol)
|
||||
int ref = 0;
|
||||
xlator_t *active_subvol = NULL;
|
||||
|
||||
if (!subvol)
|
||||
return;
|
||||
|
||||
glfs_lock (fs);
|
||||
{
|
||||
ref = (--subvol->winds);
|
||||
|
Loading…
x
Reference in New Issue
Block a user