mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
fs: change d_hash for rcu-walk
Change d_hash so it may be called from lock-free RCU lookups. See similar patch for d_compare for details. For in-tree filesystems, this is just a mechanical change. Signed-off-by: Nick Piggin <[email protected]>
This commit is contained in:
parent
621e155a35
commit
b1e6a015a5
25 changed files with 94 additions and 51 deletions
|
|
@ -148,7 +148,8 @@ static int msdos_find(struct inode *dir, const unsigned char *name, int len,
|
|||
* that the existing dentry can be used. The msdos fs routines will
|
||||
* return ENOENT or EINVAL as appropriate.
|
||||
*/
|
||||
static int msdos_hash(struct dentry *dentry, struct qstr *qstr)
|
||||
static int msdos_hash(const struct dentry *dentry, const struct inode *inode,
|
||||
struct qstr *qstr)
|
||||
{
|
||||
struct fat_mount_options *options = &MSDOS_SB(dentry->d_sb)->options;
|
||||
unsigned char msdos_name[MSDOS_NAME];
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ static unsigned int vfat_striptail_len(const struct qstr *qstr)
|
|||
* that the existing dentry can be used. The vfat fs routines will
|
||||
* return ENOENT or EINVAL as appropriate.
|
||||
*/
|
||||
static int vfat_hash(struct dentry *dentry, struct qstr *qstr)
|
||||
static int vfat_hash(const struct dentry *dentry, const struct inode *inode,
|
||||
struct qstr *qstr)
|
||||
{
|
||||
qstr->hash = full_name_hash(qstr->name, vfat_striptail_len(qstr));
|
||||
return 0;
|
||||
|
|
@ -115,9 +116,10 @@ static int vfat_hash(struct dentry *dentry, struct qstr *qstr)
|
|||
* that the existing dentry can be used. The vfat fs routines will
|
||||
* return ENOENT or EINVAL as appropriate.
|
||||
*/
|
||||
static int vfat_hashi(struct dentry *dentry, struct qstr *qstr)
|
||||
static int vfat_hashi(const struct dentry *dentry, const struct inode *inode,
|
||||
struct qstr *qstr)
|
||||
{
|
||||
struct nls_table *t = MSDOS_SB(dentry->d_inode->i_sb)->nls_io;
|
||||
struct nls_table *t = MSDOS_SB(dentry->d_sb)->nls_io;
|
||||
const unsigned char *name;
|
||||
unsigned int len;
|
||||
unsigned long hash;
|
||||
|
|
|
|||
Loading…
Reference in a new issue