Re: [PATCH v1 2/6] exfat: add exfat_get_dentry_set_by_inode() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
>  static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir,
> -               int oldentry, struct exfat_uni_name *p_uniname,
> -               struct exfat_inode_info *ei)
> +               struct exfat_uni_name *p_uniname, struct exfat_inode_info *ei)
>  {
>         int ret, num_new_entries;
>         struct exfat_dentry *epold, *epnew;
> @@ -999,7 +992,7 @@ static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir,
>         if (num_new_entries < 0)
>                 return num_new_entries;
>
> -       ret = exfat_get_dentry_set(&old_es, sb, p_dir, oldentry, ES_ALL_ENTRIES);
> +       ret = exfat_get_dentry_set_by_inode(&old_es, &ei->vfs_inode);
It is better to just use exfat_get_dentry_set rather than
exfat_get_dentry_set_by_inode here.

>         if (ret) {
>                 ret = -EIO;
>                 return ret;
> @@ -1053,21 +1046,18 @@ static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir,
>         return ret;
>  }
>
> -static int exfat_move_file(struct inode *inode, struct exfat_chain *p_olddir,
> -               int oldentry, struct exfat_chain *p_newdir,
> +static int exfat_move_file(struct inode *inode, struct exfat_chain *p_newdir,
>                 struct exfat_uni_name *p_uniname, struct exfat_inode_info *ei)
>  {
>         int ret, newentry, num_new_entries;
>         struct exfat_dentry *epmov, *epnew;
> -       struct super_block *sb = inode->i_sb;
>         struct exfat_entry_set_cache mov_es, new_es;
>
>         num_new_entries = exfat_calc_num_entries(p_uniname);
>         if (num_new_entries < 0)
>                 return num_new_entries;
>
> -       ret = exfat_get_dentry_set(&mov_es, sb, p_olddir, oldentry,
> -                       ES_ALL_ENTRIES);
> +       ret = exfat_get_dentry_set_by_inode(&mov_es, &ei->vfs_inode);
It's the same here. It is better to just use exfat_get_dentry_set().
Thanks.
>         if (ret)
>                 return -EIO;




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux