From: Dave Kleikamp Subject: Re: [PATCH 4/5] jfs: preserve i_mode if __jfs_set_acl() fails Date: Thu, 13 Jul 2017 16:01:42 -0500 Message-ID: <9edc918e-619d-7b07-696d-c0184e42c58d@oracle.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 To: "=?UTF-8?Q?Ernesto_A._Fern=c3=a1ndez?=" , Jan Kara , "Theodore Ts'o" , Andreas Dilger , linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, reiserfs-devel@vger.kernel.org Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: jfs-discussion-bounces@lists.sourceforge.net List-Id: linux-ext4.vger.kernel.org T24gMDcvMTIvMjAxNyAwNDo1NSBBTSwgRXJuZXN0byBBLiBGZXJuw6FuZGV6IHdyb3RlOgo+IFdo ZW4gY2hhbmdpbmcgYSBmaWxlJ3MgYWNsIG1hc2ssIF9famZzX3NldF9hY2woKSB3aWxsIGZpcnN0 IHNldCB0aGUgZ3JvdXAKPiBiaXRzIG9mIGlfbW9kZSB0byB0aGUgdmFsdWUgb2YgdGhlIG1hc2ss IGFuZCBvbmx5IHRoZW4gc2V0IHRoZSBhY3R1YWwKPiBleHRlbmRlZCBhdHRyaWJ1dGUgcmVwcmVz ZW50aW5nIHRoZSBuZXcgYWNsLgo+IAo+IElmIHRoZSBzZWNvbmQgcGFydCBmYWlscyAoZHVlIHRv IGxhY2sgb2Ygc3BhY2UsIGZvciBleGFtcGxlKSBhbmQgdGhlIGZpbGUKPiBoYWQgbm8gYWNsIGF0 dHJpYnV0ZSB0byBiZWdpbiB3aXRoLCB0aGUgc3lzdGVtIHdpbGwgZnJvbSBub3cgb24gYXNzdW1l Cj4gdGhhdCB0aGUgbWFzayBwZXJtaXNzaW9uIGJpdHMgYXJlIGFjdHVhbCBncm91cCBwZXJtaXNz aW9uIGJpdHMsIHBvdGVudGlhbGx5Cj4gZ3Jh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