can we combine posix_test_lock and posix_lock_file ?

Dharmosoth Seetharam seetharam_21 at yahoo.com
Mon Dec 18 08:55:27 EST 2006


Hi All,


I have small doubt regarding the NLM protocol.

I am using NLMv4 with NFSv3 and Kernel 2.6.7

my question is: 

fs/lockd/svclock.c : nlmsvc_lock()

if (!(conflock = posix_test_lock(&file->f_file,
&lock->fl))) {
/*              error = posix_lock_file(&file->f_file,
&lock->fl);


The above scenario is test and set lock.

Can we combine the two function to make a
single function call?

like

posix_test_and_lock()?

Is there any harm to the rest of the code?

Please suggest me in this regard.

Thanks
Ram





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the NFSv4 mailing list