8
8
*/
9
9
10
10
#include <linux/fs.h>
11
- #define _NEED_FILE_LOCK_FIELD_MACROS
12
11
#include <linux/filelock.h>
13
12
#include <linux/fcntl.h>
14
13
@@ -54,8 +53,8 @@ static int ocfs2_do_flock(struct file *file, struct inode *inode,
54
53
*/
55
54
56
55
locks_init_lock (& request );
57
- request .fl_type = F_UNLCK ;
58
- request .fl_flags = FL_FLOCK ;
56
+ request .c . flc_type = F_UNLCK ;
57
+ request .c . flc_flags = FL_FLOCK ;
59
58
locks_lock_file_wait (file , & request );
60
59
61
60
ocfs2_file_unlock (file );
@@ -101,7 +100,7 @@ int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl)
101
100
struct inode * inode = file -> f_mapping -> host ;
102
101
struct ocfs2_super * osb = OCFS2_SB (inode -> i_sb );
103
102
104
- if (!(fl -> fl_flags & FL_FLOCK ))
103
+ if (!(fl -> c . flc_flags & FL_FLOCK ))
105
104
return - ENOLCK ;
106
105
107
106
if ((osb -> s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS ) ||
@@ -119,7 +118,7 @@ int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl)
119
118
struct inode * inode = file -> f_mapping -> host ;
120
119
struct ocfs2_super * osb = OCFS2_SB (inode -> i_sb );
121
120
122
- if (!(fl -> fl_flags & FL_POSIX ))
121
+ if (!(fl -> c . flc_flags & FL_POSIX ))
123
122
return - ENOLCK ;
124
123
125
124
return ocfs2_plock (osb -> cconn , OCFS2_I (inode )-> ip_blkno , file , cmd , fl );
0 commit comments