Commit 7e5471ce authored by Stefan Agner's avatar Stefan Agner Committed by Richard Weinberger
Browse files

ubifs: introduce Kconfig symbol for xattr support



Allow to disable extended attribute support.

This aids in reliability testing, especially since some xattr
related bugs have surfaced.

Also an embedded system might not need it, so this allows for a
slightly smaller kernel (about 4KiB).

Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 1bf0572f
Loading
Loading
Loading
Loading
+13 −2
Original line number Original line Diff line number Diff line
@@ -51,9 +51,20 @@ config UBIFS_ATIME_SUPPORT


	  If unsure, say 'N'
	  If unsure, say 'N'


config UBIFS_FS_XATTR
	bool "UBIFS XATTR support"
	depends on UBIFS_FS
	default y
	help
	  Saying Y here includes support for extended attributes (xattrs).
	  Xattrs are name:value pairs associated with inodes by
	  the kernel or by users (see the attr(5) manual page).

	  If unsure, say Y.

config UBIFS_FS_ENCRYPTION
config UBIFS_FS_ENCRYPTION
	bool "UBIFS Encryption"
	bool "UBIFS Encryption"
	depends on UBIFS_FS && BLOCK
	depends on UBIFS_FS && UBIFS_FS_XATTR && BLOCK
	select FS_ENCRYPTION
	select FS_ENCRYPTION
	default n
	default n
	help
	help
@@ -64,7 +75,7 @@ config UBIFS_FS_ENCRYPTION


config UBIFS_FS_SECURITY
config UBIFS_FS_SECURITY
	bool "UBIFS Security Labels"
	bool "UBIFS Security Labels"
	depends on UBIFS_FS
	depends on UBIFS_FS && UBIFS_FS_XATTR
	default y
	default y
	help
	help
	  Security labels provide an access control facility to support Linux
	  Security labels provide an access control facility to support Linux
+2 −1
Original line number Original line Diff line number Diff line
@@ -4,6 +4,7 @@ obj-$(CONFIG_UBIFS_FS) += ubifs.o
ubifs-y += shrinker.o journal.o file.o dir.o super.o sb.o io.o
ubifs-y += shrinker.o journal.o file.o dir.o super.o sb.o io.o
ubifs-y += tnc.o master.o scan.o replay.o log.o commit.o gc.o orphan.o
ubifs-y += tnc.o master.o scan.o replay.o log.o commit.o gc.o orphan.o
ubifs-y += budget.o find.o tnc_commit.o compress.o lpt.o lprops.o
ubifs-y += budget.o find.o tnc_commit.o compress.o lpt.o lprops.o
ubifs-y += recovery.o ioctl.o lpt_commit.o tnc_misc.o xattr.o debug.o
ubifs-y += recovery.o ioctl.o lpt_commit.o tnc_misc.o debug.o
ubifs-y += misc.o
ubifs-y += misc.o
ubifs-$(CONFIG_UBIFS_FS_ENCRYPTION) += crypto.o
ubifs-$(CONFIG_UBIFS_FS_ENCRYPTION) += crypto.o
ubifs-$(CONFIG_UBIFS_FS_XATTR) += xattr.o
+2 −0
Original line number Original line Diff line number Diff line
@@ -1648,7 +1648,9 @@ const struct inode_operations ubifs_dir_inode_operations = {
	.rename      = ubifs_rename,
	.rename      = ubifs_rename,
	.setattr     = ubifs_setattr,
	.setattr     = ubifs_setattr,
	.getattr     = ubifs_getattr,
	.getattr     = ubifs_getattr,
#ifdef CONFIG_UBIFS_FS_XATTR
	.listxattr   = ubifs_listxattr,
	.listxattr   = ubifs_listxattr,
#endif
#ifdef CONFIG_UBIFS_ATIME_SUPPORT
#ifdef CONFIG_UBIFS_ATIME_SUPPORT
	.update_time = ubifs_update_time,
	.update_time = ubifs_update_time,
#endif
#endif
+4 −0
Original line number Original line Diff line number Diff line
@@ -1653,7 +1653,9 @@ const struct address_space_operations ubifs_file_address_operations = {
const struct inode_operations ubifs_file_inode_operations = {
const struct inode_operations ubifs_file_inode_operations = {
	.setattr     = ubifs_setattr,
	.setattr     = ubifs_setattr,
	.getattr     = ubifs_getattr,
	.getattr     = ubifs_getattr,
#ifdef CONFIG_UBIFS_FS_XATTR
	.listxattr   = ubifs_listxattr,
	.listxattr   = ubifs_listxattr,
#endif
#ifdef CONFIG_UBIFS_ATIME_SUPPORT
#ifdef CONFIG_UBIFS_ATIME_SUPPORT
	.update_time = ubifs_update_time,
	.update_time = ubifs_update_time,
#endif
#endif
@@ -1663,7 +1665,9 @@ const struct inode_operations ubifs_symlink_inode_operations = {
	.get_link    = ubifs_get_link,
	.get_link    = ubifs_get_link,
	.setattr     = ubifs_setattr,
	.setattr     = ubifs_setattr,
	.getattr     = ubifs_getattr,
	.getattr     = ubifs_getattr,
#ifdef CONFIG_UBIFS_FS_XATTR
	.listxattr   = ubifs_listxattr,
	.listxattr   = ubifs_listxattr,
#endif
#ifdef CONFIG_UBIFS_ATIME_SUPPORT
#ifdef CONFIG_UBIFS_ATIME_SUPPORT
	.update_time = ubifs_update_time,
	.update_time = ubifs_update_time,
#endif
#endif
+2 −0
Original line number Original line Diff line number Diff line
@@ -2053,7 +2053,9 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
	if (c->max_inode_sz > MAX_LFS_FILESIZE)
	if (c->max_inode_sz > MAX_LFS_FILESIZE)
		sb->s_maxbytes = c->max_inode_sz = MAX_LFS_FILESIZE;
		sb->s_maxbytes = c->max_inode_sz = MAX_LFS_FILESIZE;
	sb->s_op = &ubifs_super_operations;
	sb->s_op = &ubifs_super_operations;
#ifdef CONFIG_UBIFS_FS_XATTR
	sb->s_xattr = ubifs_xattr_handlers;
	sb->s_xattr = ubifs_xattr_handlers;
#endif
#ifdef CONFIG_UBIFS_FS_ENCRYPTION
#ifdef CONFIG_UBIFS_FS_ENCRYPTION
	sb->s_cop = &ubifs_crypt_operations;
	sb->s_cop = &ubifs_crypt_operations;
#endif
#endif
Loading