]> err.no Git - linux-2.6/blobdiff - fs/ext3/namei.c
[PATCH] ext3_clear_inode(): avoid kfree(NULL)
[linux-2.6] / fs / ext3 / namei.c
index af193a304ee5868c6bd54db9f8018159940463bb..b8f5cd1e540d40870ed98a2a25dcdeb06be8f9b4 100644 (file)
@@ -1005,10 +1005,7 @@ static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, str
                if (!inode)
                        return ERR_PTR(-EACCES);
        }
-       if (inode)
-               return d_splice_alias(inode, dentry);
-       d_add(dentry, inode);
-       return NULL;
+       return d_splice_alias(inode, dentry);
 }
 
 
@@ -2144,7 +2141,8 @@ retry:
                 * We have a transaction open.  All is sweetness.  It also sets
                 * i_size in generic_commit_write().
                 */
-               err = page_symlink(inode, symname, l);
+               err = __page_symlink(inode, symname, l,
+                               mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
                if (err) {
                        ext3_dec_count(handle, inode);
                        ext3_mark_inode_dirty(handle, inode);