From 7e7ecdfa1be0f64a808f85267b05ac3d59c225de Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 13 Feb 2004 20:53:53 +0000 Subject: [PATCH] Update b_smallfix from HEAD (20040213_1343) prior to landing. --- lustre/smfs/dir.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/lustre/smfs/dir.c b/lustre/smfs/dir.c index 9ceb905..c5f0554 100644 --- a/lustre/smfs/dir.c +++ b/lustre/smfs/dir.c @@ -14,9 +14,6 @@ #define NAME_ALLOC_LEN(len) ((len+16) & ~15) -struct dentry parent; -struct dentry cache_dentry; - void smfs_clear_dentry(struct dentry *dentry) { struct qstr *name = NULL; @@ -95,12 +92,15 @@ static void prepare_parent_dentry(struct dentry *dentry, struct inode *inode) INIT_LIST_HEAD(&dentry->d_subdirs); INIT_LIST_HEAD(&dentry->d_alias); } + static int smfs_create(struct inode *dir, struct dentry *dentry, int mode) { struct inode *cache_dir; struct inode *cache_inode = NULL, *inode; + struct dentry parent; + struct dentry cache_dentry; int rc; ENTRY; @@ -129,8 +129,6 @@ static int smfs_create(struct inode *dir, sm_set_inode_ops(cache_inode, inode); exit: smfs_clear_dentry(&cache_dentry); - if (cache_inode) - iput(cache_inode); RETURN(rc); } @@ -167,9 +165,6 @@ static struct dentry *smfs_lookup(struct inode *dir, d_add(dentry, inode); exit: smfs_clear_dentry(&cache_dentry); - - if (cache_inode) - iput(cache_inode); RETURN(rc); } @@ -404,13 +399,6 @@ static int smfs_rename(struct inode * old_dir, struct dentry *old_dentry, rc = cache_old_dir->i_op->rename(cache_old_dir, &cache_old_dentry, cache_new_dir, &cache_new_dentry); -#if 0 - cache_new_inode = cache_new_dentry.d_inode; - new_inode = iget(new_dir->i_sb, cache_new_inode->i_ino); - - d_instantiate(new_dentry, new_inode); - -#endif duplicate_inode(cache_old_dir, old_dir); duplicate_inode(cache_new_dir, new_dir); smfs_clear_dentry(&cache_old_dentry); -- 1.8.3.1