From b92a047b2e5901dd6ab325ec35b762e98f1bd3ef Mon Sep 17 00:00:00 2001 From: Lourdes Pedrajas Date: Mon, 9 Mar 2020 17:58:01 +0100 Subject: staging: exfat: exfat_super.c: remove commented out function Remove function ffsSetAttr() which is unused. Signed-off-by: Lourdes Pedrajas Link: https://lore.kernel.org/r/20200309165801.4827-1-lu@pplo.net Signed-off-by: Greg Kroah-Hartman --- drivers/staging/exfat/exfat_super.c | 77 ------------------------------------- 1 file changed, 77 deletions(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 75813d0fe7a7..c3d1a77ad060 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -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; -- cgit