Skip to content

Commit 3b9681a

Browse files
YuezhangMonamjaejeon
authored andcommitted
exfat: rename exfat_free_dentry_set() to exfat_put_dentry_set()
Since struct exfat_entry_set_cache is allocated from stack, no need to free, so rename exfat_free_dentry_set() to exfat_put_dentry_set(). After renaming, the new function pair is exfat_get_dentry_set()/exfat_put_dentry_set(). Signed-off-by: Yuezhang Mo <[email protected]> Reviewed-by: Andy Wu <[email protected]> Reviewed-by: Aoyama Wataru <[email protected]> Reviewed-by: Sungjong Seo <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
1 parent 20914ff commit 3b9681a

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

fs/exfat/dir.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static void exfat_get_uniname_from_ext_entry(struct super_block *sb,
5555
uniname += EXFAT_FILE_NAME_LEN;
5656
}
5757

58-
exfat_free_dentry_set(&es, false);
58+
exfat_put_dentry_set(&es, false);
5959
}
6060

6161
/* read a directory entry from the opened directory */
@@ -602,7 +602,7 @@ void exfat_update_dir_chksum_with_entry_set(struct exfat_entry_set_cache *es)
602602
es->modified = true;
603603
}
604604

605-
int exfat_free_dentry_set(struct exfat_entry_set_cache *es, int sync)
605+
int exfat_put_dentry_set(struct exfat_entry_set_cache *es, int sync)
606606
{
607607
int i, err = 0;
608608

@@ -860,7 +860,7 @@ int exfat_get_dentry_set(struct exfat_entry_set_cache *es,
860860

861861
ep = exfat_get_dentry_cached(es, 0);
862862
if (!exfat_validate_entry(exfat_get_entry_type(ep), &mode))
863-
goto free_es;
863+
goto put_es;
864864

865865
num_entries = type == ES_ALL_ENTRIES ?
866866
ep->dentry.file.num_ext + 1 : type;
@@ -882,28 +882,28 @@ int exfat_get_dentry_set(struct exfat_entry_set_cache *es,
882882
if (p_dir->flags == ALLOC_NO_FAT_CHAIN)
883883
clu++;
884884
else if (exfat_get_next_cluster(sb, &clu))
885-
goto free_es;
885+
goto put_es;
886886
sec = exfat_cluster_to_sector(sbi, clu);
887887
} else {
888888
sec++;
889889
}
890890

891891
bh = sb_bread(sb, sec);
892892
if (!bh)
893-
goto free_es;
893+
goto put_es;
894894
es->bh[es->num_bh++] = bh;
895895
}
896896

897897
/* validate cached dentries */
898898
for (i = 1; i < num_entries; i++) {
899899
ep = exfat_get_dentry_cached(es, i);
900900
if (!exfat_validate_entry(exfat_get_entry_type(ep), &mode))
901-
goto free_es;
901+
goto put_es;
902902
}
903903
return 0;
904904

905-
free_es:
906-
exfat_free_dentry_set(es, false);
905+
put_es:
906+
exfat_put_dentry_set(es, false);
907907
return -EIO;
908908
}
909909

fs/exfat/exfat_fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ struct exfat_dentry *exfat_get_dentry_cached(struct exfat_entry_set_cache *es,
493493
int exfat_get_dentry_set(struct exfat_entry_set_cache *es,
494494
struct super_block *sb, struct exfat_chain *p_dir, int entry,
495495
unsigned int type);
496-
int exfat_free_dentry_set(struct exfat_entry_set_cache *es, int sync);
496+
int exfat_put_dentry_set(struct exfat_entry_set_cache *es, int sync);
497497
int exfat_count_dir_entries(struct super_block *sb, struct exfat_chain *p_dir);
498498

499499
/* inode.c */

fs/exfat/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ int __exfat_write_inode(struct inode *inode, int sync)
8383
}
8484

8585
exfat_update_dir_chksum_with_entry_set(&es);
86-
return exfat_free_dentry_set(&es, sync);
86+
return exfat_put_dentry_set(&es, sync);
8787
}
8888

8989
int exfat_write_inode(struct inode *inode, struct writeback_control *wbc)

fs/exfat/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ static int exfat_find(struct inode *dir, struct qstr *qname,
676676
ep->dentry.file.access_time,
677677
ep->dentry.file.access_date,
678678
0);
679-
exfat_free_dentry_set(&es, false);
679+
exfat_put_dentry_set(&es, false);
680680

681681
if (ei->start_clu == EXFAT_FREE_CLUSTER) {
682682
exfat_fs_error(sb,

0 commit comments

Comments
 (0)