Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761698AbcJ1QWe (ORCPT ); Fri, 28 Oct 2016 12:22:34 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:39882 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761471AbcJ1QWd (ORCPT ); Fri, 28 Oct 2016 12:22:33 -0400 Date: Fri, 28 Oct 2016 17:22:27 +0100 From: Al Viro To: David Vrabel Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Boris Ostrovsky , Juergen Gross Subject: Re: [PATCH v4 0/3] libfs,xenfs: replace /proc/xen/xenbus with a symlink Message-ID: <20161028162227.GN19539@ZenIV.linux.org.uk> References: <1477669959-9486-1-git-send-email-david.vrabel@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1477669959-9486-1-git-send-email-david.vrabel@citrix.com> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 514 Lines: 11 On Fri, Oct 28, 2016 at 04:52:36PM +0100, David Vrabel wrote: > Using /proc/xen/xenbus can cause deadlocks on the atomic file position > mutex since this file should behave like a character device and not a > regular file. This is easiest to achive by making it a symlink to the > existing /dev/xen/xenbus device. What. The. Hell? What's wrong with simply adding file->f_mode &= ~FMODE_ATOMIC_POS; /* cdev-style semantics */ in the ->open() of those files, rather than going through all those convolutions?