]> git.karo-electronics.de Git - linux-beck.git/blobdiff - fs/orangefs/namei.c
Merge branch 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[linux-beck.git] / fs / orangefs / namei.c
index dde6c36f5a69073b09b27c442e543e3878bcc4b3..62c525936ee88f639725553dec920d729c2f9876 100644 (file)
@@ -72,8 +72,8 @@ static int orangefs_create(struct inode *dir,
 
        d_instantiate(dentry, inode);
        unlock_new_inode(inode);
-       dentry->d_time = jiffies + HZ;
-       ORANGEFS_I(inode)->getattr_time = 0;
+       dentry->d_time = jiffies + dcache_timeout_msecs*HZ/1000;
+       ORANGEFS_I(inode)->getattr_time = jiffies - 1;
 
        gossip_debug(GOSSIP_NAME_DEBUG,
                     "%s: dentry instantiated for %s\n",
@@ -183,7 +183,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry,
                goto out;
        }
 
-       dentry->d_time = jiffies + HZ;
+       dentry->d_time = jiffies + dcache_timeout_msecs*HZ/1000;
 
        inode = orangefs_iget(dir->i_sb, &new_op->downcall.resp.lookup.refn);
        if (IS_ERR(inode)) {
@@ -193,7 +193,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry,
                goto out;
        }
 
-       ORANGEFS_I(inode)->getattr_time = 0;
+       ORANGEFS_I(inode)->getattr_time = jiffies - 1;
 
        gossip_debug(GOSSIP_NAME_DEBUG,
                     "%s:%s:%d "
@@ -322,8 +322,8 @@ static int orangefs_symlink(struct inode *dir,
 
        d_instantiate(dentry, inode);
        unlock_new_inode(inode);
-       dentry->d_time = jiffies + HZ;
-       ORANGEFS_I(inode)->getattr_time = 0;
+       dentry->d_time = jiffies + dcache_timeout_msecs*HZ/1000;
+       ORANGEFS_I(inode)->getattr_time = jiffies - 1;
 
        gossip_debug(GOSSIP_NAME_DEBUG,
                     "Inode (Symlink) %pU -> %s\n",
@@ -386,8 +386,8 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
 
        d_instantiate(dentry, inode);
        unlock_new_inode(inode);
-       dentry->d_time = jiffies + HZ;
-       ORANGEFS_I(inode)->getattr_time = 0;
+       dentry->d_time = jiffies + dcache_timeout_msecs*HZ/1000;
+       ORANGEFS_I(inode)->getattr_time = jiffies - 1;
 
        gossip_debug(GOSSIP_NAME_DEBUG,
                     "Inode (Directory) %pU -> %s\n",
@@ -418,7 +418,7 @@ static int orangefs_rename(struct inode *old_dir,
                     "orangefs_rename: called (%pd2 => %pd2) ct=%d\n",
                     old_dentry, new_dentry, d_count(new_dentry));
 
-       ORANGEFS_I(new_dentry->d_parent->d_inode)->getattr_time = 0;
+       ORANGEFS_I(new_dentry->d_parent->d_inode)->getattr_time = jiffies - 1;
 
        new_op = op_alloc(ORANGEFS_VFS_OP_RENAME);
        if (!new_op)