Commit b92a047b authored by Lourdes Pedrajas's avatar Lourdes Pedrajas Committed by Greg Kroah-Hartman

staging: exfat: exfat_super.c: remove commented out function

Remove function ffsSetAttr() which is unused.
Signed-off-by: default avatarLourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200309165801.4827-1-lu@pplo.netSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9eafa2b7
...@@ -976,83 +976,6 @@ static int ffsRemoveFile(struct inode *inode, struct file_id_t *fid) ...@@ -976,83 +976,6 @@ static int ffsRemoveFile(struct inode *inode, struct file_id_t *fid)
return ret; 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) static int ffsReadStat(struct inode *inode, struct dir_entry_t *info)
{ {
s32 count; s32 count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment