Skip to contentSkip to conversation

shiftfs: specify struct members

PATCH New Serge E. Hallyn 1 participant 1 message May 17, 2020 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 shiftfs: specify struct members

struct path is declared as randomize_layout, so specify the struct members when initializing to avoid build failure.

---

[ this is for https://git.kernel.org/pub/scm/linux/kernel/git/jejb/binfmt_misc.git/commit/?h=shiftfs-v3 , which i was just building for an experiment ]

 fs/shiftfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/shiftfs.c +1 -1
index 7984a93745d2..6028244c2f42 100644
@@ -535,7 +535,7 @@ static int shiftfs_getattr(const struct path *path, struct kstat *stat,
 	struct dentry *real = path->dentry->d_fsdata;
 	struct inode *reali = real->d_inode;
 	const struct inode_operations *iop = reali->i_op;
-	struct path newpath = { path->dentry->d_sb->s_fs_info, real };
+	struct path newpath = { .mnt = path->dentry->d_sb->s_fs_info, .dentry = real };
 	int err = 0;
 
 	if (iop->getattr)
Signature · 1 line
2.17.1