Skip to content

Commit a43bb39

Browse files
Qu Wenruomasoncl
authored andcommitted
btrfs: Fix compile error when CONFIG_SECURITY is not set.
Fix the following compile error when CONFIG_SECURITY is not set: error: 'struct security_mnt_opts' has no member named 'num_mnt_opts' Signed-off-by: Qu Wenruo <[email protected]> Signed-off-by: Chris Mason <[email protected]>
1 parent 0d4cf4e commit a43bb39

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/btrfs/super.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,7 @@ static int setup_security_options(struct btrfs_fs_info *fs_info,
12481248
if (ret)
12491249
return ret;
12501250

1251+
#ifdef CONFIG_SECURITY
12511252
if (!fs_info->security_opts.num_mnt_opts) {
12521253
/* first time security setup, copy sec_opts to fs_info */
12531254
memcpy(&fs_info->security_opts, sec_opts, sizeof(*sec_opts));
@@ -1260,6 +1261,7 @@ static int setup_security_options(struct btrfs_fs_info *fs_info,
12601261
*/
12611262
security_free_mnt_opts(sec_opts);
12621263
}
1264+
#endif
12631265
return ret;
12641266
}
12651267

0 commit comments

Comments
 (0)