Lines Matching refs:fl
1194 static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl) in gfs2_lock() argument
1200 if (!(fl->fl_flags & FL_POSIX)) in gfs2_lock()
1202 if (__mandatory_lock(&ip->i_inode) && fl->fl_type != F_UNLCK) in gfs2_lock()
1208 fl->fl_type = F_UNLCK; in gfs2_lock()
1211 if (fl->fl_type == F_UNLCK) in gfs2_lock()
1212 locks_lock_file_wait(file, fl); in gfs2_lock()
1216 return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl); in gfs2_lock()
1217 else if (fl->fl_type == F_UNLCK) in gfs2_lock()
1218 return dlm_posix_unlock(ls->ls_dlm, ip->i_no_addr, file, fl); in gfs2_lock()
1220 return dlm_posix_lock(ls->ls_dlm, ip->i_no_addr, file, cmd, fl); in gfs2_lock()
1223 static int do_flock(struct file *file, int cmd, struct file_lock *fl) in do_flock() argument
1234 state = (fl->fl_type == F_WRLCK) ? LM_ST_EXCLUSIVE : LM_ST_SHARED; in do_flock()
1270 error = locks_lock_file_wait(file, fl); in do_flock()
1279 static void do_unflock(struct file *file, struct file_lock *fl) in do_unflock() argument
1285 locks_lock_file_wait(file, fl); in do_unflock()
1302 static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl) in gfs2_flock() argument
1304 if (!(fl->fl_flags & FL_FLOCK)) in gfs2_flock()
1306 if (fl->fl_type & LOCK_MAND) in gfs2_flock()
1309 if (fl->fl_type == F_UNLCK) { in gfs2_flock()
1310 do_unflock(file, fl); in gfs2_flock()
1313 return do_flock(file, cmd, fl); in gfs2_flock()