Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/rpc.lockd/lockd_lock.c
Show First 20 Lines • Show All 877 Lines • ▼ Show 20 Lines | |||||
* Argument fl gets modified as its list housekeeping entries get modified | * Argument fl gets modified as its list housekeeping entries get modified | ||||
* upon insertion into the NFS lock list | * upon insertion into the NFS lock list | ||||
* | * | ||||
* This routine makes several assumptions: | * This routine makes several assumptions: | ||||
* 1) It is perfectly happy to grant a duplicate lock from the same pid. | * 1) It is perfectly happy to grant a duplicate lock from the same pid. | ||||
* While this seems to be intuitively wrong, it is required for proper | * While this seems to be intuitively wrong, it is required for proper | ||||
* Posix semantics during unlock. It is absolutely imperative to not | * Posix semantics during unlock. It is absolutely imperative to not | ||||
* unlock the main lock before the two child locks are established. Thus, | * unlock the main lock before the two child locks are established. Thus, | ||||
* one has be be able to create duplicate locks over an existing lock | * one has to be able to create duplicate locks over an existing lock | ||||
* 2) It currently accepts duplicate locks from the same id,pid | * 2) It currently accepts duplicate locks from the same id,pid | ||||
*/ | */ | ||||
enum nfslock_status | enum nfslock_status | ||||
lock_nfslock(struct file_lock *fl) | lock_nfslock(struct file_lock *fl) | ||||
{ | { | ||||
enum nfslock_status retval; | enum nfslock_status retval; | ||||
struct file_lock *dummy_fl; | struct file_lock *dummy_fl; | ||||
▲ Show 20 Lines • Show All 1,412 Lines • Show Last 20 Lines |