From: Jeff Layton Subject: Re: [PATCH v23 16/22] richacl: Create-time inheritance Date: Tue, 12 Jul 2016 07:41:55 -0400 Message-ID: <1468323715.7798.10.camel@redhat.com> References: <1467294433-3222-1-git-send-email-agruenba@redhat.com> <1467294433-3222-17-git-send-email-agruenba@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: "J. Bruce Fields" , linux-nfs@vger.kernel.org, Theodore Ts'o , linux-cifs@vger.kernel.org, linux-api@vger.kernel.org, Trond Myklebust , linux-kernel@vger.kernel.org, xfs@oss.sgi.com, Christoph Hellwig , Andreas Dilger , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Anna Schumaker To: Andreas Gruenbacher , Alexander Viro Return-path: In-Reply-To: <1467294433-3222-17-git-send-email-agruenba@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com List-Id: linux-ext4.vger.kernel.org T24gVGh1LCAyMDE2LTA2LTMwIGF0IDE1OjQ3ICswMjAwLCBBbmRyZWFzIEdydWVuYmFjaGVyIHdy b3RlOgo+IFdoZW4gYSBuZXcgZmlsZSBpcyBjcmVhdGVkLCBpdCBjYW4gaW5oZXJpdCBhbiBhY2wg ZnJvbSBpdHMgcGFyZW50Cj4gZGlyZWN0b3J5OyB0aGlzIGlzIHNpbWlsYXIgdG8gaG93IGRlZmF1 bHQgYWNscyB3b3JrIGluIFBPU0lYIEFDTHMuCj4gCj4gQXMgd2l0aCBQT1NJWCBBQ0xzLCBpZiBh IGZpbGUgaW5oZXJpdHMgYW4gYWNsIGZyb20gaXRzIHBhcmVudCBkaXJlY3RvcnksCj4gdGhlIGlu dGVyc2VjdGlvbiBiZXR3ZWVuIHRoZSBjcmVhdGUgbW9kZSBhbmQgdGhlIHBlcm1pc3Npb25zIGdy YW50ZWQgYnkKPiB0aGUgaW5oZXJpdGVkIGFjbCBkZXRl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