]> git.baikalelectronics.ru Git - kernel.git/commitdiff
staging: exfat: exfat_super.c: remove commented out function
authorLourdes Pedrajas <lu@pplo.net>
Mon, 9 Mar 2020 16:58:01 +0000 (17:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Mar 2020 09:44:49 +0000 (10:44 +0100)
Remove function ffsSetAttr() which is unused.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200309165801.4827-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/exfat/exfat_super.c

index 75813d0fe7a7c7e201446b07e0260c748aad79e7..c3d1a77ad060305b540c46b8e1deeb699abf3c0f 100644 (file)
@@ -976,83 +976,6 @@ out:
        return ret;
 }
 
-#if 0
-/* Not currently wired up */
-static int ffsSetAttr(struct inode *inode, u32 attr)
-{
-       u32 type;
-       int ret = 0;
-       sector_t sector = 0;
-       struct dentry_t *ep;
-       struct super_block *sb = inode->i_sb;
-       struct fs_info_t *p_fs = &(EXFAT_SB(sb)->fs_info);
-       struct file_id_t *fid = &(EXFAT_I(inode)->fid);
-       u8 is_dir = (fid->type == TYPE_DIR) ? 1 : 0;
-       struct entry_set_cache_t *es = NULL;
-
-       if (fid->attr == attr) {
-               if (p_fs->dev_ejected)
-                       return -EIO;
-               return 0;
-       }
-
-       if (is_dir) {
-               if ((fid->dir.dir == p_fs->root_dir) &&
-                   (fid->entry == -1)) {
-                       if (p_fs->dev_ejected)
-                               return -EIO;
-                       return 0;
-               }
-       }
-
-       /* acquire the lock for file system critical section */
-       mutex_lock(&p_fs->v_mutex);
-
-       /* get the directory entry of given file */
-       es = get_entry_set_in_dir(sb, &fid->dir, fid->entry,
-                                 ES_ALL_ENTRIES, &ep);
-       if (!es) {
-               ret = -ENOENT;
-               goto out;
-       }
-
-       type = exfat_get_entry_type(ep);
-
-       if (((type == TYPE_FILE) && (attr & ATTR_SUBDIR)) ||
-           ((type == TYPE_DIR) && (!(attr & ATTR_SUBDIR)))) {
-               if (p_fs->dev_ejected)
-                       ret = -EIO;
-               else
-                       ret = -EINVAL;
-
-               release_entry_set(es);
-               goto out;
-       }
-
-       fs_set_vol_flags(sb, VOL_DIRTY);
-
-       /* set the file attribute */
-       fid->attr = attr;
-       exfat_set_entry_attr(ep, attr);
-
-       update_dir_checksum_with_entry_set(sb, es);
-       release_entry_set(es);
-
-#ifndef CONFIG_STAGING_EXFAT_DELAYED_SYNC
-       fs_sync(sb, true);
-       fs_set_vol_flags(sb, VOL_CLEAN);
-#endif
-
-       if (p_fs->dev_ejected)
-               ret = -EIO;
-out:
-       /* release the lock for file system critical section */
-       mutex_unlock(&p_fs->v_mutex);
-
-       return ret;
-}
-#endif
-
 static int ffsReadStat(struct inode *inode, struct dir_entry_t *info)
 {
        s32 count;