summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-02-25 15:37:51 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-04 03:12:30 -0800
commitefa1ce755bca123507997e6b5f3e27482fc0e3af (patch)
tree6707dc3a68a64c8dd0d2e46b31c72aa0d979b08b
parentac93e41b70d27c077ac295a1c288938156f241b0 (diff)
core: Add NULL check for inode in fd_lookup
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> 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
-rw-r--r--libglusterfs/src/fd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
index c6b060c61..4febb9f59 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)) {