From 8628de0583504138551a05ad44ca388467f0f552 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Fri, 31 Mar 2006 16:48:41 -0500 Subject: [GFS2] Update GFS2 for the recent pull from Linus Some interfaces have changed. In particular one of the posix locking functions has changed prototype, along with the address space operation invalidatepage and the block getting callback to the direct IO function. In addition add the splice file operations. These will need to be updated to support AOP_TRUNCATED_PAGE before they will be of much use to us. Signed-off-by: Steven Whitehouse --- fs/gfs2/locking/nolock/main.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'fs/gfs2/locking') diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c index 9398309..ecd3737 100644 --- a/fs/gfs2/locking/nolock/main.c +++ b/fs/gfs2/locking/nolock/main.c @@ -176,14 +176,13 @@ static void nolock_sync_lvb(lm_lock_t *lock, char *lvb) static int nolock_plock_get(lm_lockspace_t *lockspace, struct lm_lockname *name, struct file *file, struct file_lock *fl) { - struct file_lock *tmp; + struct file_lock tmp; + int ret; - lock_kernel(); - tmp = posix_test_lock(file, fl); + ret = posix_test_lock(file, fl, &tmp); fl->fl_type = F_UNLCK; - if (tmp) - memcpy(fl, tmp, sizeof(struct file_lock)); - unlock_kernel(); + if (ret) + memcpy(fl, &tmp, sizeof(struct file_lock)); return 0; } @@ -192,9 +191,7 @@ static int nolock_plock(lm_lockspace_t *lockspace, struct lm_lockname *name, struct file *file, int cmd, struct file_lock *fl) { int error; - lock_kernel(); error = posix_lock_file_wait(file, fl); - unlock_kernel(); return error; } @@ -202,9 +199,7 @@ static int nolock_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name, struct file *file, struct file_lock *fl) { int error; - lock_kernel(); error = posix_lock_file_wait(file, fl); - unlock_kernel(); return error; } -- cgit v1.1