aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-26 13:42:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-26 13:42:05 -0500
commita90e8a75fbf9e7fe2d88da6a5cf38be07fd81c35 (patch)
tree0c5388fdefd00f2f7e381e4f8bd7707e6baeb374 /fs
parentcc597bc3d31468596af6b8ad2b1d1b593e308957 (diff)
parent20d5a39929232a715f29e6cb7e3f0d0c790f41eb (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm: dlm: initialize file_lock struct in GETLK before copying conflicting lock dlm: fix plock notify callback to lockd
Diffstat (limited to 'fs')
-rw-r--r--fs/dlm/plock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
index eba87ff3177b..894a32d438d5 100644
--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -168,7 +168,7 @@ static int dlm_plock_callback(struct plock_op *op)
168 notify = xop->callback; 168 notify = xop->callback;
169 169
170 if (op->info.rv) { 170 if (op->info.rv) {
171 notify(flc, NULL, op->info.rv); 171 notify(fl, NULL, op->info.rv);
172 goto out; 172 goto out;
173 } 173 }
174 174
@@ -187,7 +187,7 @@ static int dlm_plock_callback(struct plock_op *op)
187 (unsigned long long)op->info.number, file, fl); 187 (unsigned long long)op->info.number, file, fl);
188 } 188 }
189 189
190 rv = notify(flc, NULL, 0); 190 rv = notify(fl, NULL, 0);
191 if (rv) { 191 if (rv) {
192 /* XXX: We need to cancel the fs lock here: */ 192 /* XXX: We need to cancel the fs lock here: */
193 log_print("dlm_plock_callback: lock granted after lock request " 193 log_print("dlm_plock_callback: lock granted after lock request "
@@ -304,7 +304,9 @@ int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file,
304 if (rv == -ENOENT) 304 if (rv == -ENOENT)
305 rv = 0; 305 rv = 0;
306 else if (rv > 0) { 306 else if (rv > 0) {
307 locks_init_lock(fl);
307 fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK; 308 fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK;
309 fl->fl_flags = FL_POSIX;
308 fl->fl_pid = op->info.pid; 310 fl->fl_pid = op->info.pid;
309 fl->fl_start = op->info.start; 311 fl->fl_start = op->info.start;
310 fl->fl_end = op->info.end; 312 fl->fl_end = op->info.end;