Skip to contentSkip to conversation

use set_current_state in fs

PATCH In review Milind Arun Choudhary 2 participants 3 messages Apr 14, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/4 use set_current_state in fs

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

---
 idmap.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/nfs/idmap.c +2 -2
index 9d4a6b2..054ca15 100644
@@ -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);
 
Signature · 10 lines
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
#1 lore raw
Quoted 14 lines · Milind Arun Choudhary

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

---
 idmap.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/nfs/idmap.c +0 -0
index 9d4a6b2..054ca15 100644

fs/nfs/idmap.c nfs_idmap_id(struct idmap *idmap, struct idmap_hashtable *h, · line 277

Quoted 7 lines
fs/nfs/idmap.c +1 -1
@@ -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);

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 ?

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

#2 lore raw
Quoted 3 lines · Eric Dumazet
Quoted 1 line · Milind Arun Choudhary

use set_current_state(TASK_*) instead of current->state = 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 :)

Quoted 3 lines

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

it is..

would resend later

Njo!!!

Signature · 1 line
Milind Arun Choudhary