ANDROID: sdcardfs: Fix style issues with comments
authorDaniel Rosenberg <drosen@google.com>
Fri, 17 Mar 2017 02:33:35 +0000 (19:33 -0700)
committerStricted <info@stricted.net>
Thu, 11 Oct 2018 16:03:32 +0000 (18:03 +0200)
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 35331000
Change-Id: I8791ef7eac527645ecb9407908e7e5ece35b8f80

fs/sdcardfs/dentry.c
fs/sdcardfs/derived_perm.c
fs/sdcardfs/main.c

index 3a213c75420f37cfa1ca04357ccd22f3dbd5b2ef..f58ba5908ff6e410b7288cdbb2fae1f37bdee92a 100644 (file)
@@ -127,12 +127,10 @@ static int sdcardfs_hash_ci(const struct dentry *dentry,
        unsigned long hash;
 
        name = qstr->name;
-       //len = vfat_striptail_len(qstr);
        len = qstr->len;
 
        hash = init_name_hash();
        while (len--)
-               //hash = partial_name_hash(nls_tolower(t, *name++), hash);
                hash = partial_name_hash(tolower(*name++), hash);
        qstr->hash = end_name_hash(hash);
 
@@ -147,20 +145,8 @@ static int sdcardfs_cmp_ci(const struct dentry *parent,
                const struct dentry *dentry, const struct inode *inode,
                unsigned int len, const char *str, const struct qstr *name)
 {
-       /* This function is copy of vfat_cmpi */
-       // FIXME Should we support national language?
-       //struct nls_table *t = MSDOS_SB(parent->d_sb)->nls_io;
-       //unsigned int alen, blen;
+       /* FIXME Should we support national language? */
 
-       /* A filename cannot end in '.' or we treat it like it has none */
-       /*
-       alen = vfat_striptail_len(name);
-       blen = __vfat_striptail_len(len, str);
-       if (alen == blen) {
-               if (nls_strnicmp(t, name->name, str, alen) == 0)
-                       return 0;
-       }
-       */
        if (name->len == len) {
                if (str_n_case_eq(name->name, str, len))
                        return 0;
index 8d5c1fdcdfe31cd6e879639c1bfea8717a48c115..2da612e39fa62b979bd49757e2096194257ed29f 100644 (file)
@@ -318,9 +318,7 @@ inline void update_derived_permission_lock(struct dentry *dentry)
         * 1. need to check whether the dentry is updated or not
         * 2. remove the root dentry update
         */
-       if (IS_ROOT(dentry)) {
-               //setup_default_pre_root_state(dentry->d_inode);
-       } else {
+       if (!IS_ROOT(dentry)) {
                parent = dget_parent(dentry);
                if (parent) {
                        get_derived_permission(parent, dentry);
@@ -370,7 +368,6 @@ int is_obbpath_invalid(struct dentry *dent)
                        ret = 1;
                } else {
                        path_get(&di->lower_path);
-                       //lower_parent = lock_parent(lower_path->dentry);
 
                        path_buf = kmalloc(PATH_MAX, GFP_ATOMIC);
                        if (!path_buf) {
@@ -385,7 +382,6 @@ int is_obbpath_invalid(struct dentry *dent)
                                kfree(path_buf);
                        }
 
-                       //unlock_dir(lower_parent);
                        pathcpy(&lower_path, &di->lower_path);
                        need_put = 1;
                }
@@ -431,7 +427,8 @@ int setup_obb_dentry(struct dentry *dentry, struct path *lower_path)
 
        /* A local obb dentry must have its own orig_path to support rmdir
         * and mkdir of itself. Usually, we expect that the sbi->obbpath
-        * is avaiable on this stage. */
+        * is avaiable on this stage.
+        */
        sdcardfs_set_orig_path(dentry, lower_path);
 
        err = kern_path(sbi->obbpath_s,
index 4a04c91ab45652a56e26d7f3b267c3fa61ff88d4..c2159accc4e9506981872d1f84e1c05b3259bb45 100644 (file)
@@ -29,7 +29,7 @@ enum {
        Opt_gid,
        Opt_debug,
        Opt_mask,
-       Opt_multiuser, // May need?
+       Opt_multiuser,
        Opt_userid,
        Opt_reserved_mb,
        Opt_err,