1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
diff -uNr cluster-1.04.00.orig/gfs-kernel/src/gfs/ops_file.c cluster-1.03.00/gfs-kernel/src/gfs/ops_file.c
--- cluster-1.04.00.orig/gfs-kernel/src/gfs/ops_file.c 2006-06-29 18:50:41.000000000 +0200
+++ cluster-1.04.00/gfs-kernel/src/gfs/ops_file.c 2006-08-30 18:18:06.000000000 +0200
@@ -1465,13 +1465,12 @@
if (sdp->sd_args.ar_localflocks) {
if (IS_GETLK(cmd)) {
- struct file_lock tmp;
- int ret;
+ struct file_lock *tmp;
lock_kernel();
- ret = posix_test_lock(file, fl, &tmp);
+ tmp = posix_test_lock(file, fl);
fl->fl_type = F_UNLCK;
- if (ret)
- memcpy(fl, &tmp, sizeof(struct file_lock));
+ if (tmp)
+ memcpy(fl, tmp, sizeof(struct file_lock));
unlock_kernel();
return 0;
} else {
diff -uNr cluster-1.03.00.orig/gfs-kernel/src/nolock/main.c cluster-1.03.00/gfs-kernel/src/nolock/main.c
--- cluster-1.03.00.orig/gfs-kernel/src/nolock/main.c 2006-08-16 23:53:20.000000000 +0200
+++ cluster-1.03.00/gfs-kernel/src/nolock/main.c 2006-08-30 18:18:06.000000000 +0200
@@ -243,14 +243,13 @@
struct lm_lockname *name,
struct file *file, struct file_lock *fl)
{
- struct file_lock tmp;
- int ret;
+ struct file_lock *tmp;
lock_kernel();
- ret = posix_test_lock(file, fl, &tmp);
+ tmp = posix_test_lock(file, fl);
fl->fl_type = F_UNLCK;
- if (ret)
- memcpy(fl, &tmp, sizeof(struct file_lock));
+ if (tmp)
+ memcpy(fl, tmp, sizeof(struct file_lock));
unlock_kernel();
return 0;
|