staging: exfat: remove symlink feature
authorTetsuhiro Kohada <Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>
Thu, 27 Feb 2020 06:15:59 +0000 (15:15 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Mar 2020 06:46:33 +0000 (07:46 +0100)
Completely remove symlink codes and definitions.
In the previous patch, it was not completely removed.

Reviewed-by: Takahiro Mori <Mori.Takahiro@ab.MitsubishiElectric.co.jp>
Signed-off-by: Tetsuhiro Kohada <Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>
Link: https://lore.kernel.org/r/20200227061559.4481-1-Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/exfat/exfat.h
drivers/staging/exfat/exfat_core.c
drivers/staging/exfat/exfat_super.c

index 4a0a481..cd3479f 100644 (file)
@@ -63,7 +63,6 @@
 #define TYPE_VOLUME            0x0103
 #define TYPE_DIR               0x0104
 #define TYPE_FILE              0x011F
-#define TYPE_SYMLINK           0x015F
 #define TYPE_CRITICAL_SEC      0x0200
 #define TYPE_STREAM            0x0201
 #define TYPE_EXTEND            0x0202
@@ -198,13 +197,11 @@ static inline u16 get_row_index(u16 i)
 #define ATTR_VOLUME            0x0008
 #define ATTR_SUBDIR            0x0010
 #define ATTR_ARCHIVE           0x0020
-#define ATTR_SYMLINK           0x0040
 #define ATTR_EXTEND            0x000F
 #define ATTR_RWMASK            0x007E
 
 /* file creation modes */
 #define FM_REGULAR              0x00
-#define FM_SYMLINK              0x40
 
 #define NUM_UPCASE              2918
 
index d30dc05..941094b 100644 (file)
@@ -844,9 +844,6 @@ static void exfat_set_entry_type(struct dentry_t *p_entry, u32 type)
        } else if (type == TYPE_FILE) {
                ep->type = 0x85;
                SET16_A(ep->attr, ATTR_ARCHIVE);
-       } else if (type == TYPE_SYMLINK) {
-               ep->type = 0x85;
-               SET16_A(ep->attr, ATTR_ARCHIVE | ATTR_SYMLINK);
        }
 }
 
index c7bc07e..6f3b72e 100644 (file)
@@ -320,8 +320,6 @@ static inline mode_t exfat_make_mode(struct exfat_sb_info *sbi, u32 attr,
 
        if (attr & ATTR_SUBDIR)
                return (mode & ~sbi->options.fs_dmask) | S_IFDIR;
-       else if (attr & ATTR_SYMLINK)
-               return (mode & ~sbi->options.fs_dmask) | S_IFLNK;
        else
                return (mode & ~sbi->options.fs_fmask) | S_IFREG;
 }
@@ -2399,24 +2397,6 @@ static const struct inode_operations exfat_dir_inode_operations = {
 /*======================================================================*/
 /*  File Operations                                                     */
 /*======================================================================*/
-static const char *exfat_get_link(struct dentry *dentry, struct inode *inode,
-                                 struct delayed_call *done)
-{
-       struct exfat_inode_info *ei = EXFAT_I(inode);
-
-       if (ei->target) {
-               char *cookie = ei->target;
-
-               if (cookie)
-                       return (char *)(ei->target);
-       }
-       return NULL;
-}
-
-static const struct inode_operations exfat_symlink_inode_operations = {
-               .get_link = exfat_get_link,
-};
-
 static int exfat_file_release(struct inode *inode, struct file *filp)
 {
        struct super_block *sb = inode->i_sb;
@@ -2688,13 +2668,6 @@ static int exfat_fill_inode(struct inode *inode, struct file_id_t *fid)
                i_size_write(inode, info.Size);
                EXFAT_I(inode)->mmu_private = i_size_read(inode);
                set_nlink(inode, info.num_subdirs);
-       } else if (info.attr & ATTR_SYMLINK) { /* symbolic link */
-               inode->i_generation |= 1;
-               inode->i_mode = exfat_make_mode(sbi, info.attr, 0777);
-               inode->i_op = &exfat_symlink_inode_operations;
-
-               i_size_write(inode, info.Size);
-               EXFAT_I(inode)->mmu_private = i_size_read(inode);
        } else { /* regular file */
                inode->i_generation |= 1;
                inode->i_mode = exfat_make_mode(sbi, info.attr, 0777);