summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c
index fa0e751c7..d41bd1815 100644
--- a/xlators/nfs/server/src/nfs3-helpers.c
+++ b/xlators/nfs/server/src/nfs3-helpers.c
@@ -1908,6 +1908,9 @@ nfs3_fdcache_update (struct nfs3_state *nfs3, fd_t *fd)
int
__nfs3_fdcache_remove_entry (struct nfs3_state *nfs3, struct nfs3_fd_entry *fde)
{
+ if ((!fde) || (!nfs3))
+ return 0;
+
gf_log (GF_NFS3, GF_LOG_TRACE, "Removing fd: 0x%lx: %d",
(long int)fde->cachedfd, fde->cachedfd->refcount);
list_del (&fde->list);