summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src
diff options
context:
space:
mode:
authorRichard Wareing <rwareing@fb.com>2016-06-03 20:39:36 -0700
committerJeff Darcy <jdarcy@redhat.com>2017-03-02 14:23:20 -0500
commit6a3f2b5d0542464b14b3263ecf31f995717eee8f (patch)
treed633d5c9dd94cb99d2bbbc40b3ee972da683bb1a /xlators/protocol/server/src
parent9ed98f23564387c5b436a0c6ec6d4393f970dcb9 (diff)
protocol/server: Fix crash bug in unlink flow
Summary: Fixes a crash bug during unlink in server-rpc-fops.c Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I049a9863ffd4003742276e0aa9e8d1224488182d BUG: 1428093 Tested-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-on: https://review.gluster.org/16814 Tested-by: Vijay Bellur <vbellur@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src')
-rw-r--r--xlators/protocol/server/src/server-rpc-fops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c
index 5bb40a77515..54081625a5c 100644
--- a/xlators/protocol/server/src/server-rpc-fops.c
+++ b/xlators/protocol/server/src/server-rpc-fops.c
@@ -35,6 +35,10 @@
void
forget_inode_if_no_dentry (inode_t *inode)
{
+ if (!inode) {
+ return;
+ }
+
if (!inode_has_dentry (inode))
inode_forget (inode, 0);