summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-07-21 00:43:18 -0700
committerVijay Bellur <vbellur@redhat.com>2013-07-28 08:20:20 -0700
commitaa70c0bba081b7a56a3894c5454a78b27753bdff (patch)
treee59db73bbb3e30a57e66c77d6aba03498ac9cf3e /api/src
parentc6b8143b9f61f59326563dd5274f9d1849577cef (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.c3
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);