This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
RHEL5 - gfs-kernel: bz466677 - fault in posix_lock_file() -"gfs_controld" responds to orphaned "plock_xop" request -suspected cause is patch for Bug 196318
- From: Abhijith Das <adas at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Fri, 31 Oct 2008 14:23:16 +0000 (UTC)
- Subject: RHEL5 - gfs-kernel: bz466677 - fault in posix_lock_file() -"gfs_controld" responds to orphaned "plock_xop" request -suspected cause is patch for Bug 196318
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=dc134cf7214cf1d18fcfcaea770a5444a555851c
Commit: dc134cf7214cf1d18fcfcaea770a5444a555851c
Parent: 469bdb2968d5be3029b916083ceadcb5d813c214
Author: Abhijith Das <adas@redhat.com>
AuthorDate: Fri Oct 31 09:20:39 2008 -0500
Committer: Abhijith Das <adas@redhat.com>
CommitterDate: Fri Oct 31 09:20:39 2008 -0500
gfs-kernel: bz466677 - fault in posix_lock_file() - "gfs_controld" responds to orphaned "plock_xop" request - suspected cause is patch for Bug 196318
gfs_lock() doesn't handle F_CANCELLK correctly (command not implemented).
This patch implements the F_CANCELLK command in gfs_lock().
---
gfs-kernel/src/gfs/ops_file.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/gfs-kernel/src/gfs/ops_file.c b/gfs-kernel/src/gfs/ops_file.c
index 5df9a81..3cad78e 100644
--- a/gfs-kernel/src/gfs/ops_file.c
+++ b/gfs-kernel/src/gfs/ops_file.c
@@ -1602,6 +1602,12 @@ gfs_lock(struct file *file, int cmd, struct file_lock *fl)
if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
return -ENOLCK;
+ if (cmd == F_CANCELLK) {
+ /* Hack: */
+ cmd = F_SETLK;
+ fl->fl_type = F_UNLCK;
+ }
+
if (IS_GETLK(cmd))
return gfs_lm_plock_get(sdp, &name, file, fl);
else if (fl->fl_type == F_UNLCK)