Re: [PATCH v3] btrfs: preserve i_mode if __btrfs_set_acl() fails

2017-08-14 Thread David Sterba
On Wed, Aug 02, 2017 at 03:18:27AM -0300, Ernesto A. Fernández wrote: > When changing a file's acl mask, btrfs_set_acl() will first set the > group bits of i_mode to the value of the mask, and only then set the > actual extended attribute representing the new acl. > > If the second part fails

[PATCH v3] btrfs: preserve i_mode if __btrfs_set_acl() fails

2017-08-02 Thread Ernesto A . Fernández
When changing a file's acl mask, btrfs_set_acl() will first set the group bits of i_mode to the value of the mask, and only then set the actual extended attribute representing the new acl. If the second part fails (due to lack of space, for example) and the file had no acl attribute to begin