diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-31 16:48:41 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-31 16:48:41 -0500 |
commit | 8628de0583504138551a05ad44ca388467f0f552 (patch) | |
tree | 15a0e85dca99d74e54765a71fe2f59c4228d68c1 /fs/gfs2/ops_file.c | |
parent | 86579dd06deecfa6ac88d5e84e4d63c397cd6f6d (diff) |
[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 <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_file.c')
-rw-r--r-- | fs/gfs2/ops_file.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index db4484a3efcc..c44225fa758b 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c | |||
@@ -833,20 +833,15 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl) | |||
833 | 833 | ||
834 | if (sdp->sd_args.ar_localflocks) { | 834 | if (sdp->sd_args.ar_localflocks) { |
835 | if (IS_GETLK(cmd)) { | 835 | if (IS_GETLK(cmd)) { |
836 | struct file_lock *tmp; | 836 | struct file_lock tmp; |
837 | lock_kernel(); | 837 | int ret; |
838 | tmp = posix_test_lock(file, fl); | 838 | ret = posix_test_lock(file, fl, &tmp); |
839 | fl->fl_type = F_UNLCK; | 839 | fl->fl_type = F_UNLCK; |
840 | if (tmp) | 840 | if (ret) |
841 | memcpy(fl, tmp, sizeof(struct file_lock)); | 841 | memcpy(fl, &tmp, sizeof(struct file_lock)); |
842 | unlock_kernel(); | ||
843 | return 0; | 842 | return 0; |
844 | } else { | 843 | } else { |
845 | int error; | 844 | return posix_lock_file_wait(file, fl); |
846 | lock_kernel(); | ||
847 | error = posix_lock_file_wait(file, fl); | ||
848 | unlock_kernel(); | ||
849 | return error; | ||
850 | } | 845 | } |
851 | } | 846 | } |
852 | 847 | ||
@@ -983,6 +978,8 @@ struct file_operations gfs2_file_fops = { | |||
983 | .lock = gfs2_lock, | 978 | .lock = gfs2_lock, |
984 | .sendfile = gfs2_sendfile, | 979 | .sendfile = gfs2_sendfile, |
985 | .flock = gfs2_flock, | 980 | .flock = gfs2_flock, |
981 | .splice_read = generic_file_splice_read, | ||
982 | .splice_write = generic_file_splice_write, | ||
986 | }; | 983 | }; |
987 | 984 | ||
988 | struct file_operations gfs2_dir_fops = { | 985 | struct file_operations gfs2_dir_fops = { |