aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 63daa06c4194..ee3a5d957051 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -242,7 +242,7 @@ void sysfs_drop_dentry(struct sysfs_dirent *sd)
242 242
243 dput(dentry); 243 dput(dentry);
244 /* XXX: unpin if directory, this will go away soon */ 244 /* XXX: unpin if directory, this will go away soon */
245 if (sd->s_type & SYSFS_DIR) 245 if (sysfs_type(sd) == SYSFS_DIR)
246 dput(dentry); 246 dput(dentry);
247 247
248 /* adjust nlink and update timestamp */ 248 /* adjust nlink and update timestamp */
@@ -254,7 +254,7 @@ void sysfs_drop_dentry(struct sysfs_dirent *sd)
254 254
255 inode->i_ctime = curtime; 255 inode->i_ctime = curtime;
256 drop_nlink(inode); 256 drop_nlink(inode);
257 if (sd->s_type & SYSFS_DIR) 257 if (sysfs_type(sd) == SYSFS_DIR)
258 drop_nlink(inode); 258 drop_nlink(inode);
259 259
260 mutex_unlock(&inode->i_mutex); 260 mutex_unlock(&inode->i_mutex);
@@ -267,7 +267,7 @@ void sysfs_drop_dentry(struct sysfs_dirent *sd)
267 mutex_lock(&inode->i_mutex); 267 mutex_lock(&inode->i_mutex);
268 268
269 inode->i_ctime = inode->i_mtime = curtime; 269 inode->i_ctime = inode->i_mtime = curtime;
270 if (sd->s_type & SYSFS_DIR) 270 if (sysfs_type(sd) == SYSFS_DIR)
271 drop_nlink(inode); 271 drop_nlink(inode);
272 272
273 mutex_unlock(&inode->i_mutex); 273 mutex_unlock(&inode->i_mutex);
@@ -293,7 +293,7 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name)
293 for (pos = &parent_sd->s_children; *pos; pos = &(*pos)->s_sibling) { 293 for (pos = &parent_sd->s_children; *pos; pos = &(*pos)->s_sibling) {
294 sd = *pos; 294 sd = *pos;
295 295
296 if (!sd->s_type) 296 if (!sysfs_type(sd))
297 continue; 297 continue;
298 if (!strcmp(sd->s_name, name)) { 298 if (!strcmp(sd->s_name, name)) {
299 *pos = sd->s_sibling; 299 *pos = sd->s_sibling;