svclock.c (0612ec48762bf8712db1925b2e67246d2237ebab) svclock.c (e9ff3990f08e9a0c2839cc22808b01732ea5b3e4)
1/*
2 * linux/fs/lockd/svclock.c
3 *
4 * Handling of server-side locks, mostly of the blocked variety.
5 * This is the ugliest part of lockd because we tread on very thin ice.
6 * GRANT and CANCEL calls may get stuck, meet in mid-flight, etc.
7 * IMNSHO introducing the grant callback into the NLM protocol was one
8 * of the worst ideas Sun ever had. Except maybe for the idea of doing

--- 311 unchanged lines hidden (view full) ---

320/*
321 * Initialize arguments for GRANTED call. The nlm_rqst structure
322 * has been cleared already.
323 */
324static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct nlm_lock *lock)
325{
326 locks_copy_lock(&call->a_args.lock.fl, &lock->fl);
327 memcpy(&call->a_args.lock.fh, &lock->fh, sizeof(call->a_args.lock.fh));
1/*
2 * linux/fs/lockd/svclock.c
3 *
4 * Handling of server-side locks, mostly of the blocked variety.
5 * This is the ugliest part of lockd because we tread on very thin ice.
6 * GRANT and CANCEL calls may get stuck, meet in mid-flight, etc.
7 * IMNSHO introducing the grant callback into the NLM protocol was one
8 * of the worst ideas Sun ever had. Except maybe for the idea of doing

--- 311 unchanged lines hidden (view full) ---

320/*
321 * Initialize arguments for GRANTED call. The nlm_rqst structure
322 * has been cleared already.
323 */
324static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct nlm_lock *lock)
325{
326 locks_copy_lock(&call->a_args.lock.fl, &lock->fl);
327 memcpy(&call->a_args.lock.fh, &lock->fh, sizeof(call->a_args.lock.fh));
328 call->a_args.lock.caller = system_utsname.nodename;
328 call->a_args.lock.caller = utsname()->nodename;
329 call->a_args.lock.oh.len = lock->oh.len;
330
331 /* set default data area */
332 call->a_args.lock.oh.data = call->a_owner;
333 call->a_args.lock.svid = lock->fl.fl_pid;
334
335 if (lock->oh.len > NLMCLNT_OHSIZE) {
336 void *data = kmalloc(lock->oh.len, GFP_KERNEL);

--- 384 unchanged lines hidden ---
329 call->a_args.lock.oh.len = lock->oh.len;
330
331 /* set default data area */
332 call->a_args.lock.oh.data = call->a_owner;
333 call->a_args.lock.svid = lock->fl.fl_pid;
334
335 if (lock->oh.len > NLMCLNT_OHSIZE) {
336 void *data = kmalloc(lock->oh.len, GFP_KERNEL);

--- 384 unchanged lines hidden ---