Whamcloud - gitweb
Update smfs: fix bugs of smfs_create
authorwangdi <wangdi>
Fri, 13 Feb 2004 14:28:46 +0000 (14:28 +0000)
committerwangdi <wangdi>
Fri, 13 Feb 2004 14:28:46 +0000 (14:28 +0000)
lustre/smfs/dir.c

index e6d986f..c5f0554 100644 (file)
@@ -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; 
@@ -102,6 +99,8 @@ static int smfs_create(struct inode *dir,
 {
        struct  inode *cache_dir; 
        struct  inode *cache_inode = NULL, *inode;
+       struct  dentry parent; 
+       struct  dentry cache_dentry;
        int     rc;
        
        ENTRY;
@@ -400,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);