 flock;  struct inode *inode;  struct file *f;  int error;   if (file_lock == NULL)   return -ENOLCK;   /*   * This might block, so we do it before checking the inode.   */  error = -EFAULT;  if (copy_from_user(&flock, l, sizeof(flock)))   goto out;   inode = file_inode(filp);   /* Don't allow mandatory locks on files that may be memory mapped   * and shared.   */  if (mandatory_lock(inode) && mapping_writably_mapped(filp->f_mapping)) {   error = -EAGAIN;   goto out;  }   error = flock