@@ -165,7 +165,7 @@ static int tomoyo_path_truncate(const struct path *path)
165
165
*/
166
166
static int tomoyo_path_unlink (const struct path * parent , struct dentry * dentry )
167
167
{
168
- struct path path = { parent -> mnt , dentry };
168
+ struct path path = { . mnt = parent -> mnt , . dentry = dentry };
169
169
return tomoyo_path_perm (TOMOYO_TYPE_UNLINK , & path , NULL );
170
170
}
171
171
@@ -181,7 +181,7 @@ static int tomoyo_path_unlink(const struct path *parent, struct dentry *dentry)
181
181
static int tomoyo_path_mkdir (const struct path * parent , struct dentry * dentry ,
182
182
umode_t mode )
183
183
{
184
- struct path path = { parent -> mnt , dentry };
184
+ struct path path = { . mnt = parent -> mnt , . dentry = dentry };
185
185
return tomoyo_path_number_perm (TOMOYO_TYPE_MKDIR , & path ,
186
186
mode & S_IALLUGO );
187
187
}
@@ -196,7 +196,7 @@ static int tomoyo_path_mkdir(const struct path *parent, struct dentry *dentry,
196
196
*/
197
197
static int tomoyo_path_rmdir (const struct path * parent , struct dentry * dentry )
198
198
{
199
- struct path path = { parent -> mnt , dentry };
199
+ struct path path = { . mnt = parent -> mnt , . dentry = dentry };
200
200
return tomoyo_path_perm (TOMOYO_TYPE_RMDIR , & path , NULL );
201
201
}
202
202
@@ -212,7 +212,7 @@ static int tomoyo_path_rmdir(const struct path *parent, struct dentry *dentry)
212
212
static int tomoyo_path_symlink (const struct path * parent , struct dentry * dentry ,
213
213
const char * old_name )
214
214
{
215
- struct path path = { parent -> mnt , dentry };
215
+ struct path path = { . mnt = parent -> mnt , . dentry = dentry };
216
216
return tomoyo_path_perm (TOMOYO_TYPE_SYMLINK , & path , old_name );
217
217
}
218
218
@@ -229,7 +229,7 @@ static int tomoyo_path_symlink(const struct path *parent, struct dentry *dentry,
229
229
static int tomoyo_path_mknod (const struct path * parent , struct dentry * dentry ,
230
230
umode_t mode , unsigned int dev )
231
231
{
232
- struct path path = { parent -> mnt , dentry };
232
+ struct path path = { . mnt = parent -> mnt , . dentry = dentry };
233
233
int type = TOMOYO_TYPE_CREATE ;
234
234
const unsigned int perm = mode & S_IALLUGO ;
235
235
@@ -268,8 +268,8 @@ static int tomoyo_path_mknod(const struct path *parent, struct dentry *dentry,
268
268
static int tomoyo_path_link (struct dentry * old_dentry , const struct path * new_dir ,
269
269
struct dentry * new_dentry )
270
270
{
271
- struct path path1 = { new_dir -> mnt , old_dentry };
272
- struct path path2 = { new_dir -> mnt , new_dentry };
271
+ struct path path1 = { . mnt = new_dir -> mnt , . dentry = old_dentry };
272
+ struct path path2 = { . mnt = new_dir -> mnt , . dentry = new_dentry };
273
273
return tomoyo_path2_perm (TOMOYO_TYPE_LINK , & path1 , & path2 );
274
274
}
275
275
@@ -288,8 +288,8 @@ static int tomoyo_path_rename(const struct path *old_parent,
288
288
const struct path * new_parent ,
289
289
struct dentry * new_dentry )
290
290
{
291
- struct path path1 = { old_parent -> mnt , old_dentry };
292
- struct path path2 = { new_parent -> mnt , new_dentry };
291
+ struct path path1 = { . mnt = old_parent -> mnt , . dentry = old_dentry };
292
+ struct path path2 = { . mnt = new_parent -> mnt , . dentry = new_dentry };
293
293
return tomoyo_path2_perm (TOMOYO_TYPE_RENAME , & path1 , & path2 );
294
294
}
295
295
@@ -417,7 +417,7 @@ static int tomoyo_sb_mount(const char *dev_name, const struct path *path,
417
417
*/
418
418
static int tomoyo_sb_umount (struct vfsmount * mnt , int flags )
419
419
{
420
- struct path path = { mnt , mnt -> mnt_root };
420
+ struct path path = { . mnt = mnt , . dentry = mnt -> mnt_root };
421
421
return tomoyo_path_perm (TOMOYO_TYPE_UMOUNT , & path , NULL );
422
422
}
423
423
0 commit comments