From: Christoph Hellwig Subject: [PATCH 12/14] lustre: separate errno from VM_FAULT_* values Date: Wed, 16 May 2018 07:43:46 +0200 Message-ID: <20180516054348.15950-13-hch@lst.de> References: <20180516054348.15950-1-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org, ocfs2-devel@oss.oracle.com, devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, lustre-devel@lists.lustre.org To: Souptick Joarder , Matthew Wilcox Return-path: In-Reply-To: <20180516054348.15950-1-hch@lst.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" List-Id: linux-ext4.vger.kernel.org U2lnbmVkLW9mZi1ieTogQ2hyaXN0b3BoIEhlbGx3aWcgPGhjaEBsc3QuZGU+Ci0tLQogLi4uL3N0 YWdpbmcvbHVzdHJlL2x1c3RyZS9sbGl0ZS9sbGl0ZV9tbWFwLmMgIHwgMzcgKysrKysrKy0tLS0t LS0tLS0tLQogLi4uL2x1c3RyZS9sdXN0cmUvbGxpdGUvdnZwX2ludGVybmFsLmggICAgICAgIHwg IDIgKy0KIDIgZmlsZXMgY2hhbmdlZCwgMTQgaW5zZXJ0aW9ucygrKSwgMjUgZGVsZXRpb25zKC0p CgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL2x1c3RyZS9sdXN0cmUvbGxpdGUvbGxpdGVf bW1hcC5jIGIvZHJpdmVycy9zdGFnaW5nL2x1c3RyZS9sdXN0cmUvbGxpdGUvbGxpdGVfbW1hcC5j CmluZGV4IDIxNGIwNzU1NGU2Mi4uMDYxZDk4ODcxOTU5IDEwMDY0N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