Re: [PATCH v2 12/17] btrfs: turn on inlinecrypt mount option for encrypt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 16, 2023 at 11:52:43PM -0400, Sweet Tea Dorminy wrote:
> fscrypt's extent encryption requires the use of inline encryption or the
> software fallback that the block layer provides; it is rather
> complicated to allow software encryption with extent encryption due to
> the timing of memory allocations. Thus, if btrfs has ever had a
> encrypted file, or when encryption is enabled on a directory, update the
> mount flags to include inlinecrypt.
> 
> Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@xxxxxxxxxx>
> ---
>  fs/btrfs/ioctl.c |  4 ++++
>  fs/btrfs/super.c | 10 ++++++++++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index 91ad59519900..11866a88e33f 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -4574,6 +4574,10 @@ long btrfs_ioctl(struct file *file, unsigned int
>  		 * state persists.
>  		 */
>  		btrfs_set_fs_incompat(fs_info, ENCRYPT);
> +		if (!(inode->i_sb->s_flags & SB_INLINECRYPT)) {
> +			inode->i_sb->s_flags |= SB_INLINECRYPT;
> +			mb();

Extraneous mb().  Thanks,

Josef



[Index of Archives]     [linux Cryptography]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]

  Powered by Linux