diff options
Diffstat (limited to 'sys-cluster/glusterfs/files/glusterfs-3.4.0-gfapi-handle-failures-in-graph-switches.patch')
-rw-r--r-- | sys-cluster/glusterfs/files/glusterfs-3.4.0-gfapi-handle-failures-in-graph-switches.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.4.0-gfapi-handle-failures-in-graph-switches.patch b/sys-cluster/glusterfs/files/glusterfs-3.4.0-gfapi-handle-failures-in-graph-switches.patch new file mode 100644 index 000000000000..91da4f0adecc --- /dev/null +++ b/sys-cluster/glusterfs/files/glusterfs-3.4.0-gfapi-handle-failures-in-graph-switches.patch @@ -0,0 +1,35 @@ +From ccb48ebfafba7ba50d3fb156ecd8ba9666577fd2 Mon Sep 17 00:00:00 2001 +From: Anand Avati <avati@redhat.com> +Date: Sun, 21 Jul 2013 00:43:18 -0700 +Subject: [PATCH] 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> +--- + 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 4a634df..beb2703 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); +-- +1.7.4.1 + |