This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
STABLE2 - 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:50 +0000 (UTC)
- Subject: STABLE2 - 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=05eb450c115d9822cfbab9eae89467353801a3b2
Commit: 05eb450c115d9822cfbab9eae89467353801a3b2
Parent: 7c19c84528694f78836dfa40900606d418529c39
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:21:25 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 95eb2a3..3f94134 100644
--- a/gfs-kernel/src/gfs/ops_file.c
+++ b/gfs-kernel/src/gfs/ops_file.c
@@ -1603,6 +1603,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)