Whamcloud - gitweb
LU-15027 sec: initialize ll_inode_info for fake inode 23/45023/2
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 22 Sep 2021 15:35:49 +0000 (17:35 +0200)
committerOleg Drokin <green@whamcloud.com>
Wed, 29 Sep 2021 03:37:48 +0000 (03:37 +0000)
When creating an encrypted symlink, we need to make use of a fake
inode in order to be able to encrypt the target name before sending
the create request to the MDS.
This fake inode needs minimal initialization, but it is at least
required to properly initialize the ll_inode_info associated with this
fake inode.

Fixes: e735298935 ("LU-13717 sec: filename encryption - symlink support")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I20c30d873f9bffdbdc8b5f272cb8b80e5be7fbfb
Reviewed-on: https://review.whamcloud.com/45023
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/namei.c

index 9e314f1..cdac373 100644 (file)
@@ -1606,6 +1606,7 @@ again:
 #ifdef IOP_XATTR
                        fakeinode->i_opflags |= IOP_XATTR;
 #endif
+                       ll_lli_init(ll_i2info(fakeinode));
                        err = ll_set_encflags(fakeinode,
                                              op_data->op_file_encctx,
                                              op_data->op_file_encctx_size,