-+STATIC int
-+mini_fo_lock(file_t *file, int cmd, struct file_lock *fl)
-+{
-+ int err = -EINVAL;
-+ file_t *hidden_file = NULL;
-+
-+ if(!check_mini_fo_file(file))
-+ goto out;
-+
-+ /* which file shall we lock? */
-+ if(ftohf2(file))
-+ hidden_file = ftohf2(file);
-+ else
-+ hidden_file = ftohf(file);
-+
-+ if (hidden_file->f_op->lock) {
-+ fl->fl_file = hidden_file;
-+ err = hidden_file->f_op->lock(hidden_file, F_GETLK, fl);
-+ fl->fl_file = file;
-+ } else {
-+ if(posix_test_lock(hidden_file, fl))
-+ err = 0;
-+ }
-+ out:
-+ return err;
-+}
-+