X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fllite%2Ffile.c;h=d03ec7614c183bb7908505ebe783e0405c247e17;hp=f793d52445c5439e0f3e6facee9c317d3ae299d5;hb=539d4218b8c6d025bb2ebffec313a38b53e08cd1;hpb=5bea38b1bf8136ea4b286388ce83f2660a425493 diff --git a/lustre/llite/file.c b/lustre/llite/file.c index f793d52..d03ec76 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -2155,15 +2155,15 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) } flock.l_flock.pid = file_lock->fl_pid; - /* Somewhat ugly workaround for svc lockd. - * lockd installs custom fl_lmops->fl_compare_owner that checks - * for the fl_owner to be the same (which it always is on local node - * I guess between lockd processes) and then compares pid. - * As such we assign pid to the owner field to make it all work, - * conflict with normal locks is unlikely since pid space and - * pointer space for current->files are not intersecting */ - if (file_lock->fl_lmops && file_lock->fl_lmops->fl_compare_owner) - flock.l_flock.owner = (unsigned long)file_lock->fl_pid; + /* Somewhat ugly workaround for svc lockd. + * lockd installs custom fl_lmops->lm_compare_owner that checks + * for the fl_owner to be the same (which it always is on local node + * I guess between lockd processes) and then compares pid. + * As such we assign pid to the owner field to make it all work, + * conflict with normal locks is unlikely since pid space and + * pointer space for current->files are not intersecting */ + if (file_lock->fl_lmops && file_lock->fl_lmops->lm_compare_owner) + flock.l_flock.owner = (unsigned long)file_lock->fl_pid; switch (file_lock->fl_type) { case F_RDLCK: