diff options
Diffstat (limited to 'fs/configfs/dir.c')
-rw-r--r-- | fs/configfs/dir.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 8a3b6a1..1814ba446 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -93,8 +93,8 @@ static struct configfs_dirent *configfs_new_dirent(struct configfs_dirent * pare * * called with parent inode's i_mutex held */ -int configfs_dirent_exists(struct configfs_dirent *parent_sd, - const unsigned char *new) +static int configfs_dirent_exists(struct configfs_dirent *parent_sd, + const unsigned char *new) { struct configfs_dirent * sd; @@ -980,7 +980,7 @@ int configfs_rename_dir(struct config_item * item, const char *new_name) static int configfs_dir_open(struct inode *inode, struct file *file) { - struct dentry * dentry = file->f_dentry; + struct dentry * dentry = file->f_path.dentry; struct configfs_dirent * parent_sd = dentry->d_fsdata; mutex_lock(&dentry->d_inode->i_mutex); @@ -993,7 +993,7 @@ static int configfs_dir_open(struct inode *inode, struct file *file) static int configfs_dir_close(struct inode *inode, struct file *file) { - struct dentry * dentry = file->f_dentry; + struct dentry * dentry = file->f_path.dentry; struct configfs_dirent * cursor = file->private_data; mutex_lock(&dentry->d_inode->i_mutex); @@ -1013,7 +1013,7 @@ static inline unsigned char dt_type(struct configfs_dirent *sd) static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir) { - struct dentry *dentry = filp->f_dentry; + struct dentry *dentry = filp->f_path.dentry; struct configfs_dirent * parent_sd = dentry->d_fsdata; struct configfs_dirent *cursor = filp->private_data; struct list_head *p, *q = &cursor->s_sibling; @@ -1070,7 +1070,7 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir static loff_t configfs_dir_lseek(struct file * file, loff_t offset, int origin) { - struct dentry * dentry = file->f_dentry; + struct dentry * dentry = file->f_path.dentry; mutex_lock(&dentry->d_inode->i_mutex); switch (origin) { @@ -1080,7 +1080,7 @@ static loff_t configfs_dir_lseek(struct file * file, loff_t offset, int origin) if (offset >= 0) break; default: - mutex_unlock(&file->f_dentry->d_inode->i_mutex); + mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); return -EINVAL; } if (offset != file->f_pos) { @@ -1176,8 +1176,9 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys) return; } - mutex_lock(&configfs_sb->s_root->d_inode->i_mutex); - mutex_lock(&dentry->d_inode->i_mutex); + mutex_lock_nested(&configfs_sb->s_root->d_inode->i_mutex, + I_MUTEX_PARENT); + mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD); if (configfs_detach_prep(dentry)) { printk(KERN_ERR "configfs: Tried to unregister non-empty subsystem!\n"); } |