Skip to content

Commit

Permalink
ANDROID: sdcardfs: remove effectless config option
Browse files Browse the repository at this point in the history
CONFIG_SDCARD_FS_CI_SEARCH only guards a define for
LOOKUP_CASE_INSENSITIVE, which is never used in the
kernel. Remove both, along with the option matching
that supports it.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
(cherry picked from commit 7828a50f5b5bb9a69a70371caa140c3966c31a7d)

BUG=b:27794037
TEST=Build and boot on Smaug.

Change-Id: Iffe0c882464c916b28a6eee9be90e3cf5942422c
[abrestic: removed now-unused label and local variable]
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/335187
Reviewed-by: Daniel Rosenberg <drosen@google.com>
(cherry picked from commit 5995d73924904714b47d2204d6f7bcefd7604373)
Reviewed-on: https://chromium-review.googlesource.com/336847
  • Loading branch information
Daniel Rosenberg authored and ChromeOS bot committed Apr 1, 2016
1 parent 094d730 commit a71c1d5
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 37 deletions.
5 changes: 0 additions & 5 deletions fs/sdcardfs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,3 @@ config SDCARD_FS_FADV_NOACTIVE
default y
help
Sdcardfs supports fadvise noactive mode.

config SDCARD_FS_CI_SEARCH
tristate "sdcardfs case-insensitive search support"
depends on SDCARD_FS
default y
7 changes: 1 addition & 6 deletions fs/sdcardfs/lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,8 @@ static struct dentry *__sdcardfs_lookup(struct dentry *dentry,
lower_dir_mnt = lower_parent_path->mnt;

/* Use vfs_path_lookup to check if the dentry exists or not */
if (sbi->options.lower_fs == LOWER_FS_EXT4) {
err = vfs_path_lookup(lower_dir_dentry, lower_dir_mnt, name,
LOOKUP_CASE_INSENSITIVE, &lower_path);
} else if (sbi->options.lower_fs == LOWER_FS_FAT) {
err = vfs_path_lookup(lower_dir_dentry, lower_dir_mnt, name, 0,
err = vfs_path_lookup(lower_dir_dentry, lower_dir_mnt, name, 0,
&lower_path);
}

/* no error: handle positive dentries */
if (!err) {
Expand Down
17 changes: 0 additions & 17 deletions fs/sdcardfs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ static const match_table_t sdcardfs_tokens = {
{Opt_fsgid, "fsgid=%u"},
{Opt_gid, "gid=%u"},
{Opt_debug, "debug"},
{Opt_lower_fs, "lower_fs=%s"},
{Opt_mask, "mask=%u"},
{Opt_userid, "userid=%d"},
{Opt_multiuser, "multiuser"},
Expand All @@ -55,7 +54,6 @@ static int parse_options(struct super_block *sb, char *options, int silent,
char *p;
substring_t args[MAX_OPT_ARGS];
int option;
char *string_option;

/* by default, we use AID_MEDIA_RW as uid, gid */
opts->fs_low_uid = AID_MEDIA_RW;
Expand All @@ -64,8 +62,6 @@ static int parse_options(struct super_block *sb, char *options, int silent,
opts->multiuser = false;
opts->fs_user_id = 0;
opts->gid = 0;
/* by default, we use LOWER_FS_EXT4 as lower fs type */
opts->lower_fs = LOWER_FS_EXT4;
/* by default, 0MB is reserved */
opts->reserved_mb = 0;

Expand Down Expand Up @@ -113,26 +109,13 @@ static int parse_options(struct super_block *sb, char *options, int silent,
case Opt_multiuser:
opts->multiuser = true;
break;
case Opt_lower_fs:
string_option = match_strdup(&args[0]);
if (!strcmp("ext4", string_option)) {
opts->lower_fs = LOWER_FS_EXT4;
} else if (!strcmp("fat", string_option)) {
opts->lower_fs = LOWER_FS_FAT;
} else {
kfree(string_option);
goto invalid_option;
}
kfree(string_option);
break;
case Opt_reserved_mb:
if (match_int(&args[0], &option))
return 0;
opts->reserved_mb = option;
break;
/* unknown option */
default:
invalid_option:
if (!silent) {
printk( KERN_ERR "Unrecognized mount option \"%s\" "
"or missing value", p);
Expand Down
6 changes: 0 additions & 6 deletions fs/sdcardfs/sdcardfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ typedef enum {
PERM_ANDROID_MEDIA,
} perm_t;

typedef enum {
LOWER_FS_EXT4,
LOWER_FS_FAT,
} lower_fs_t;

struct sdcardfs_sb_info;
struct sdcardfs_mount_options;

Expand Down Expand Up @@ -191,7 +186,6 @@ struct sdcardfs_mount_options {
gid_t fs_low_gid;
userid_t fs_user_id;
gid_t gid;
lower_fs_t lower_fs;
mode_t mask;
bool multiuser;
unsigned int reserved_mb;
Expand Down
3 changes: 0 additions & 3 deletions include/linux/namei.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
#define LOOKUP_JUMPED 0x1000
#define LOOKUP_ROOT 0x2000
#define LOOKUP_EMPTY 0x4000
#ifdef CONFIG_SDCARD_FS_CI_SEARCH
#define LOOKUP_CASE_INSENSITIVE 0x8000
#endif

extern int user_path_at(int, const char __user *, unsigned, struct path *);
extern int user_path_at_empty(int, const char __user *, unsigned, struct path *, int *empty);
Expand Down

0 comments on commit a71c1d5

Please sign in to comment.