#ifdef AFS_LINUX24_ENV
if ((code == 0 || flp->fl_type == F_UNLCK) &&
(cmd == F_SETLK || cmd == F_SETLKW)) {
-#ifdef AFS_LINUX26_ENV
+#ifdef POSIX_LOCK_FILE_WAIT_ARG
+ code = posix_lock_file(fp, flp, 0);
+#else
flp->fl_flags &=~ FL_SLEEP;
code = posix_lock_file(fp, flp);
-#else
- code = posix_lock_file(fp, flp, 0);
#endif
if (code && flp->fl_type != F_UNLCK) {
struct AFS_FLOCK flock2;
* afs_StoreAllSegments() with AFS_LASTSTORE
*/
static int
+#if defined(FOP_FLUSH_TAKES_FL_OWNER_T)
+afs_linux_flush(struct file *fp, fl_owner_t id)
+#else
afs_linux_flush(struct file *fp)
+#endif
{
struct vrequest treq;
struct vcache *vcp = VTOAFS(FILE_INODE(fp));