2007-04-14 08:47:51

by Milind Arun Choudhary

[permalink] [raw]
Subject: [KJ][PATCH 03/04]use set_current_state in fs

use set_current_state(TASK_*) instead of current->state = TASK_*, in fs/nfs

Signed-off-by: Milind Arun Choudhary <[email protected]>


---
idmap.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index 9d4a6b2..054ca15 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -272,7 +272,7 @@ nfs_idmap_id(struct idmap *idmap, struct idmap_hashtable *h,
set_current_state(TASK_UNINTERRUPTIBLE);
mutex_unlock(&idmap->idmap_im_lock);
schedule();
- current->state = TASK_RUNNING;
+ set_current_state(TASK_RUNNING);
remove_wait_queue(&idmap->idmap_wq, &wq);
mutex_lock(&idmap->idmap_im_lock);

@@ -333,7 +333,7 @@ nfs_idmap_name(struct idmap *idmap, struct idmap_hashtable *h,
set_current_state(TASK_UNINTERRUPTIBLE);
mutex_unlock(&idmap->idmap_im_lock);
schedule();
- current->state = TASK_RUNNING;
+ set_current_state(TASK_RUNNING);
remove_wait_queue(&idmap->idmap_wq, &wq);
mutex_lock(&idmap->idmap_im_lock);

--
Milind Arun Choudhary

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2007-04-14 09:39:11

by Eric Dumazet

[permalink] [raw]
Subject: Re: [KJ] [PATCH 03/04]use set_current_state in fs

Milind Arun Choudhary a =E9crit :
> use set_current_state(TASK_*) instead of current->state =3D TASK_*, in fs=
/nfs
> =

> Signed-off-by: Milind Arun Choudhary <[email protected]>
> =

> =

> ---
> idmap.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> =

> diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
> index 9d4a6b2..054ca15 100644
> --- a/fs/nfs/idmap.c
> +++ b/fs/nfs/idmap.c
> @@ -272,7 +272,7 @@ nfs_idmap_id(struct idmap *idmap, struct idmap_hashta=
ble *h,
> set_current_state(TASK_UNINTERRUPTIBLE);
> mutex_unlock(&idmap->idmap_im_lock);
> schedule();
> - current->state =3D TASK_RUNNING;
> + set_current_state(TASK_RUNNING);
> remove_wait_queue(&idmap->idmap_wq, &wq);
> mutex_lock(&idmap->idmap_im_lock);

Probably a dumb question, so please forgive me.

Why are you forcing a memory barrier here, (and also on your other patches=
).

Is'nt a __set_current_state(TASK_RUNNING); appropriate ?

2007-04-14 10:16:07

by Milind Arun Choudhary

[permalink] [raw]
Subject: Re: [KJ][PATCH 03/04]use set_current_state in fs

On 11:39 Sat 14 Apr , Eric Dumazet wrote:
> Milind Arun Choudhary a =E9crit :
> >use set_current_state(TASK_*) instead of current->state =3D TASK_*, =
in fs/nfs
> Probably a dumb question, so please forgive me.
no.
you have a valid point

My bad :(
I should probably be enjoying my weekend outdoors..
breath some fresh air...
rather than sending such dumb patches..

ummmmmmmm
booting into windows might help :)

> Why are you forcing a memory barrier here, (and also on your other=20
> patches).
> Is'nt a __set_current_state(TASK_RUNNING); appropriate ?
it is..

would resend later

Njo!!!
--=20
Milind Arun Choudhary