lkml.org 
[lkml]   [2020]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 1/2] staging: exfat: clean up d_entry rebuilding.
Date
Thanks for your comment.

> Are you sure this is OK to do? exfat_get_entry_type() does a lot of
> mapping between values, using a file_dentry_t->type, while
> fid->type is a file_id_t->type.

The fid argument of exfat_rename_file()/move_file()from old_dentry->fid of exfat_rename().
* exfat_rename_file() <- ffsMoveFile() <- exfat_rename()
* move_file() <- ffsMoveFile() <- exfat_rename()

The value that vfs sets to the old_dentry of exfat_rename() is the dentry value returned by exfat_lookup(), exfat_create(), and create_dir().
In each function, the value of dentry->fid is initialized to fid->type at create_file(), ffsLookupFile(), and create_dir().

* create_file() <- ffsCreateFile() <-exfat_create()
* ffsLookupFile() <- exfat_find() <-exfat_lookup()
* exfat_mkdir() <- ffsCreateDir() <-create_dir()

> and at first read it's not obvious to
> fid->me whether type is guaranteed to have the correct value already.

A valid value is set in fid->type for all paths.
What do you think?

--
Kohada Tetsuhiro <Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>


\
 
 \ /
  Last update: 2020-03-03 04:09    [W:0.058 / U:1.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site