dcache.c (1d33369db25eb7f37b7a8bd22d736888b4501a9c) | dcache.c (804b1737d71253f01621d2a37a0dce6279a2d440) |
---|---|
1/* 2 * (C) 2001 Clemson University and The University of Chicago 3 * 4 * See COPYING in top-level directory. 5 */ 6 7/* 8 * Implementation of dentry (directory cache) functions. --- 59 unchanged lines hidden (view full) --- 68 if (new_op->downcall.status != 0) 69 gossip_debug(GOSSIP_DCACHE_DEBUG, 70 "%s:%s:%d lookup failure.\n", 71 __FILE__, __func__, __LINE__); 72 goto out_drop; 73 } 74 } 75 | 1/* 2 * (C) 2001 Clemson University and The University of Chicago 3 * 4 * See COPYING in top-level directory. 5 */ 6 7/* 8 * Implementation of dentry (directory cache) functions. --- 59 unchanged lines hidden (view full) --- 68 if (new_op->downcall.status != 0) 69 gossip_debug(GOSSIP_DCACHE_DEBUG, 70 "%s:%s:%d lookup failure.\n", 71 __FILE__, __func__, __LINE__); 72 goto out_drop; 73 } 74 } 75 |
76 dentry->d_time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000; | 76 orangefs_set_timeout(dentry); |
77 ret = 1; 78out_release_op: 79 op_release(new_op); 80out_put_parent: 81 dput(parent_dentry); 82 return ret; 83out_drop: 84 gossip_debug(GOSSIP_DCACHE_DEBUG, "%s:%s:%d revalidate failed\n", --- 4 unchanged lines hidden (view full) --- 89/* 90 * Verify that dentry is valid. 91 * 92 * Should return 1 if dentry can still be trusted, else 0. 93 */ 94static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags) 95{ 96 int ret; | 77 ret = 1; 78out_release_op: 79 op_release(new_op); 80out_put_parent: 81 dput(parent_dentry); 82 return ret; 83out_drop: 84 gossip_debug(GOSSIP_DCACHE_DEBUG, "%s:%s:%d revalidate failed\n", --- 4 unchanged lines hidden (view full) --- 89/* 90 * Verify that dentry is valid. 91 * 92 * Should return 1 if dentry can still be trusted, else 0. 93 */ 94static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags) 95{ 96 int ret; |
97 unsigned long time = (unsigned long) dentry->d_fsdata; |
|
97 | 98 |
98 if (time_before(jiffies, dentry->d_time)) | 99 if (time_before(jiffies, time)) |
99 return 1; 100 101 if (flags & LOOKUP_RCU) 102 return -ECHILD; 103 104 gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: called on dentry %p.\n", 105 __func__, dentry); 106 --- 36 unchanged lines hidden --- | 100 return 1; 101 102 if (flags & LOOKUP_RCU) 103 return -ECHILD; 104 105 gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: called on dentry %p.\n", 106 __func__, dentry); 107 --- 36 unchanged lines hidden --- |