diff options
| author | lucasponez <lucasponez@outlook.com> | 2020-12-08 00:53:18 -0800 |
|---|---|---|
| committer | lucasponez <lucasponez@outlook.com> | 2020-12-08 00:53:18 -0800 |
| commit | b9ebceb39505bd5540e01d088375ca8c16ef36c0 (patch) | |
| tree | 80c3e0596f3ccf2cade4a7b29c711488b469ac25 | |
| parent | 98a5d4e00f39893e194d5ae65451f618dfef410f (diff) | |
Revert "sdcardfs: set lower fs xattr at mounting"
This reverts commit bd5d03e1adfbaca8dae16b5a44b7e24a7076a4f8.
| -rw-r--r-- | fs/sdcardfs/Kconfig | 4 | ||||
| -rw-r--r-- | fs/sdcardfs/dentry.c | 2 | ||||
| -rw-r--r-- | fs/sdcardfs/inode.c | 2 | ||||
| -rw-r--r-- | fs/sdcardfs/main.c | 21 | ||||
| -rw-r--r-- | fs/sdcardfs/sdcardfs.h | 2 |
5 files changed, 4 insertions, 27 deletions
diff --git a/fs/sdcardfs/Kconfig b/fs/sdcardfs/Kconfig index 05d57b6c3d0f..0073914cfe7c 100644 --- a/fs/sdcardfs/Kconfig +++ b/fs/sdcardfs/Kconfig @@ -13,7 +13,7 @@ config SDCARD_FS_FADV_NOACTIVE Sdcardfs supports fadvise noactive mode. config SDCARD_FS_PARTIAL_RELATIME - string "sdcardfs partial relatime update support" + bool "sdcardfs partial relatime update support" depends on SDCARD_FS default n help @@ -24,7 +24,7 @@ config SDCARD_FS_PARTIAL_RELATIME would be updated whatever their xattr is set. config SDCARD_FS_DIR_WRITER - string "sdcardfs directory writer extended attribute support" + bool "sdcardfs directory writer extended attribute support" depends on SDCARD_FS default n help diff --git a/fs/sdcardfs/dentry.c b/fs/sdcardfs/dentry.c index a68d9e518ce8..f558a976f7fd 100644 --- a/fs/sdcardfs/dentry.c +++ b/fs/sdcardfs/dentry.c @@ -195,7 +195,7 @@ void sdcardfs_update_xattr_dirwriter(struct dentry *lower_dentry, struct dentry *dentry, *parent; const char *dir_name[2]; int xlen, depth; - const char *xattr_feat_name = SDCARDFS_XATTR_DWRITER_NAME; + const char *xattr_feat_name = "user.dwriter"; const char *xattr_name = "user.dwriter.name"; struct dentry *xdentry = NULL, *child = NULL; appid_t app_id = uid_is_app(writer_uid) ? diff --git a/fs/sdcardfs/inode.c b/fs/sdcardfs/inode.c index e0f4091279b1..72a13a84f1e5 100644 --- a/fs/sdcardfs/inode.c +++ b/fs/sdcardfs/inode.c @@ -937,7 +937,7 @@ void sdcardfs_update_relatime_flag(struct file *lower_file, char *xexcept = NULL, *xpath; int xlen, i, depth = 0; struct dentry *dentry, *parent, *child = NULL; - const char *xattr_name = SDCARDFS_XATTR_PARTIAL_RELATIME_NAME; + const char *xattr_name = "user.relatime"; __u32 flags = 0; appid_t app_id = uid_is_app(writer_uid) ? writer_uid % AID_USER_OFFSET : 0; diff --git a/fs/sdcardfs/main.c b/fs/sdcardfs/main.c index 2962d099a18e..41fd9b9df9c8 100644 --- a/fs/sdcardfs/main.c +++ b/fs/sdcardfs/main.c @@ -22,7 +22,6 @@ #include <linux/module.h> #include <linux/types.h> #include <linux/parser.h> -#include <linux/xattr.h> enum { Opt_fsuid, @@ -377,26 +376,6 @@ static int sdcardfs_read_super(struct vfsmount *mnt, struct super_block *sb, if (!silent) pr_info("sdcardfs: mounted on top of %s type %s\n", dev_name, lower_sb->s_type->name); - -#ifdef CONFIG_SDCARD_FS_DIR_WRITER - if (vfs_setxattr(lower_path.dentry, - SDCARDFS_XATTR_DWRITER_NAME, - CONFIG_SDCARD_FS_DIR_WRITER, - strlen(CONFIG_SDCARD_FS_DIR_WRITER), 0)) { - pr_warn("sdcardfs: failed to set %s\n", - SDCARDFS_XATTR_DWRITER_NAME); - } -#endif -#ifdef CONFIG_SDCARD_FS_PARTIAL_RELATIME - if (vfs_setxattr(lower_path.dentry, - SDCARDFS_XATTR_PARTIAL_RELATIME_NAME, - CONFIG_SDCARD_FS_PARTIAL_RELATIME, - strlen(CONFIG_SDCARD_FS_PARTIAL_RELATIME), 0)) { - pr_warn("sdcardfs: failed to set xattr %s\n", - SDCARDFS_XATTR_PARTIAL_RELATIME_NAME); - } -#endif - goto out; /* all is well */ /* no longer needed: free_dentry_private_data(sb->s_root); */ diff --git a/fs/sdcardfs/sdcardfs.h b/fs/sdcardfs/sdcardfs.h index e73fc3e197a1..a1de835fc28d 100644 --- a/fs/sdcardfs/sdcardfs.h +++ b/fs/sdcardfs/sdcardfs.h @@ -73,8 +73,6 @@ #define AID_PACKAGE_INFO 1027 -#define SDCARDFS_XATTR_DWRITER_NAME "user.dwriter" -#define SDCARDFS_XATTR_PARTIAL_RELATIME_NAME "user.relatime" /* * Permissions are handled by our permission function. |
