summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-04-20 13:15:12 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-20 13:15:12 +0530
commitaa085b10678c01693d0f7222bd4054bb8e8836cc (patch)
tree598e9b7fd0fa93d7ce7f2ccd2e29931efa8941bd
parent8660bb2bef59c00df194087ed75ba81f34555a73 (diff)
inode.c - NULL check for the extra __inode_search performed, when presented inode is not hashed.
This bug fixes #967
-rw-r--r--libglusterfs/src/inode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index e8c4cca03..49d5c5620 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -705,6 +705,8 @@ inode_lookup (inode_t *inode)
{
if (!__is_inode_hashed (inode)) {
lookup_inode = __inode_search (table, inode->ino);
+ if (lookup_inode == NULL)
+ lookup_inode = inode;
}
__inode_lookup (lookup_inode);
@@ -728,6 +730,8 @@ inode_forget (inode_t *inode, uint64_t nlookup)
{
if (!__is_inode_hashed (inode)) {
forget_inode = __inode_search (table, inode->ino);
+ if (forget_inode == NULL)
+ forget_inode = inode;
}
__inode_forget (forget_inode, nlookup);
@@ -800,6 +804,8 @@ inode_rename (inode_table_t *table,
{
if (!__is_inode_hashed (inode)) {
rename_inode = __inode_search (table, inode->ino);
+ if (rename_inode == NULL)
+ rename_inode = inode;
}
old_dst = __dentry_search (table, dstdir->ino, dstname);