Skip to contentSkip to conversation

2.4 v. 2.5 nfs_dentry_iput()

DISCUSSION Frank Cusack 2 participants 2 messages Jun 2, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

Could someone quickly explain the difference between the 2.4.20 and 2.5.69 nfs_dentry_iput()?

static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)

{
        if (dentry->d_flags & DCACHE_NFSFS_RENAMED) {
                lock_kernel();
		inode->i_nlink--;		/* only in 2.5 */
                nfs_complete_unlink(dentry);
                unlock_kernel();
        }
        if (is_bad_inode(inode))		/* not in 2.5 */
                force_delete(inode);		/* not in 2.5 */
        /* When creating a negative dentry, we want to renew d_time */
        nfs_renew_times(dentry);		/* only in 2.5 */
        iput(inode);
}

Thanks,
/fc

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

" " == Frank Cusack <[email protected]> writes:

     > Hi, Could someone quickly explain the difference between the
     > 2.4.20 and 2.5.69 nfs_dentry_iput()?

     > static void nfs_dentry_iput(struct dentry *dentry, struct inode
     > *inode) {
     >         if (dentry->d_flags & DCACHE_NFSFS_RENAMED) {
     >                 lock_kernel();
     >                 inode-> i_nlink--; /* only in 2.5 */

Should eventually go into 2.4.x. Not critical...

     >                 nfs_complete_unlink(dentry); unlock_kernel();
     >         } if (is_bad_inode(inode)) /* not in 2.5 */
     >                 force_delete(inode); /* not in 2.5 */

Done in the VFS in 2.5

> /* When creating a negative dentry, we want to renew
> d_time */ nfs_renew_times(dentry); /* only in 2.5 */

Only needed for the new CTO code in 2.5.

     >         iput(inode);
     > }

Cheers,
Trond