Skip to content

Commit

Permalink
btrfs: Fix compile error when CONFIG_SECURITY is not set.
Browse files Browse the repository at this point in the history
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 <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
Qu Wenruo authored and Chris Mason committed Oct 8, 2014
1 parent 0d4cf4e commit a43bb39
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,7 @@ static int setup_security_options(struct btrfs_fs_info *fs_info,
if (ret)
return ret;

#ifdef CONFIG_SECURITY
if (!fs_info->security_opts.num_mnt_opts) {
/* first time security setup, copy sec_opts to fs_info */
memcpy(&fs_info->security_opts, sec_opts, sizeof(*sec_opts));
Expand All @@ -1260,6 +1261,7 @@ static int setup_security_options(struct btrfs_fs_info *fs_info,
*/
security_free_mnt_opts(sec_opts);
}
#endif
return ret;
}

Expand Down

0 comments on commit a43bb39

Please sign in to comment.