diff options
author | Anand Avati <avati@redhat.com> | 2013-07-21 00:43:18 -0700 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-07-30 22:17:36 -0700 |
commit | ccb48ebfafba7ba50d3fb156ecd8ba9666577fd2 (patch) | |
tree | c44be0c912e1a64c43cd4fa9b8d1fbd49e35425b | |
parent | 97348f25884e60dc7744e1a48f67374e5156240f (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/5427
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
-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); |