lkml.org 
[lkml]   [2005]   [Sep]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 1 Sep 2005 01:38:36 -0700
FromAndrew Morton <>
SubjectRe: [PATCH] replace hack with dget/mntget usage in fs/dcookies.c
Kirill Korotaev <dev@sw.ru> wrote:
>
> This patch replaces manual incrementing of refcounters on dentry/mnt in 
>  fs/dcookie.c with calls to dget()/mntget().
>
> ...
>
>  --- linux-2.6.8.1-t032/fs/dcookies.c.dget	2004-08-14 14:54:46.000000000 +0400
>  +++ linux-2.6.8.1-t032/fs/dcookies.c	2005-08-23 14:09:00.000000000 +0400

Whoa.  Medieval kernel.

>  @@ -93,12 +93,10 @@ static struct dcookie_struct * alloc_dco
>   	if (!dcs)
>   		return NULL;
> 
>  -	atomic_inc(&dentry->d_count);
>  -	atomic_inc(&vfsmnt->mnt_count);
>   	dentry->d_cookie = dcs;
> 
>  -	dcs->dentry = dentry;
>  -	dcs->vfsmnt = vfsmnt;
>  +	dcs->dentry = dget(dentry);
>  +	dcs->vfsmnt = mntget(vfsmnt);
>   	hash_dcookie(dcs);
> 
>   	return dcs;

That's already there.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-01 10:45    [from the cache]
©2003-2008