diff options
author | Anand Avati <avati@redhat.com> | 2013-07-21 00:43:18 -0700 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-07-28 08:20:20 -0700 |
commit | aa70c0bba081b7a56a3894c5454a78b27753bdff (patch) | |
tree | e59db73bbb3e30a57e66c77d6aba03498ac9cf3e /api/src | |
parent | c6b8143b9f61f59326563dd5274f9d1849577cef (diff) |
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>
Diffstat (limited to 'api/src')
-rw-r--r-- | api/src/glfs-resolve.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c index 4a634df6ec1..beb270322eb 100644 --- a/api/src/glfs-resolve.c +++ b/api/src/glfs-resolve.c @@ -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); |