From 586759f03e2e9031ac5589912a51a909ed53c30a Mon Sep 17 00:00:00 2001 From: Marc Eshel Date: Tue, 14 Nov 2006 16:37:25 -0500 Subject: gfs2: nfs lock support for gfs2 Add NFS lock support to GFS2. Signed-off-by: Marc Eshel Signed-off-by: J. Bruce Fields Acked-by: Steven Whitehouse --- fs/gfs2/ops_file.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/gfs2/ops_file.c') diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 48b248d7c82..329c4dcdecd 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c @@ -520,6 +520,11 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl) } } + if (cmd == F_CANCELLK) { + /* Hack: */ + cmd = F_SETLK; + fl->fl_type = F_UNLCK; + } if (IS_GETLK(cmd)) return gfs2_lm_plock_get(sdp, &name, file, fl); else if (fl->fl_type == F_UNLCK) -- cgit v1.2.3