From efa1ce755bca123507997e6b5f3e27482fc0e3af Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 25 Feb 2010 15:37:51 +0000 Subject: core: Add NULL check for inode in fd_lookup Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597 --- libglusterfs/src/fd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libglusterfs/src/fd.c') diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c index c6b060c61a5..4febb9f59e4 100644 --- a/libglusterfs/src/fd.c +++ b/libglusterfs/src/fd.c @@ -511,6 +511,9 @@ fd_lookup (inode_t *inode, pid_t pid) fd_t *fd = NULL; fd_t *iter_fd = NULL; + if (!inode) + return NULL; + LOCK (&inode->lock); { if (list_empty (&inode->fd_list)) { -- cgit