diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 090f0eacde29..296cf2fde945 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1378,7 +1378,7 @@ struct super_block { | |||
1378 | #else | 1378 | #else |
1379 | struct list_head s_files; | 1379 | struct list_head s_files; |
1380 | #endif | 1380 | #endif |
1381 | /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */ | 1381 | /* s_dentry_lru, s_nr_dentry_unused protected by dcache.c lru locks */ |
1382 | struct list_head s_dentry_lru; /* unused dentry lru */ | 1382 | struct list_head s_dentry_lru; /* unused dentry lru */ |
1383 | int s_nr_dentry_unused; /* # of dentry on lru */ | 1383 | int s_nr_dentry_unused; /* # of dentry on lru */ |
1384 | 1384 | ||
@@ -2446,6 +2446,10 @@ static inline ino_t parent_ino(struct dentry *dentry) | |||
2446 | { | 2446 | { |
2447 | ino_t res; | 2447 | ino_t res; |
2448 | 2448 | ||
2449 | /* | ||
2450 | * Don't strictly need d_lock here? If the parent ino could change | ||
2451 | * then surely we'd have a deeper race in the caller? | ||
2452 | */ | ||
2449 | spin_lock(&dentry->d_lock); | 2453 | spin_lock(&dentry->d_lock); |
2450 | res = dentry->d_parent->d_inode->i_ino; | 2454 | res = dentry->d_parent->d_inode->i_ino; |
2451 | spin_unlock(&dentry->d_lock); | 2455 | spin_unlock(&dentry->d_lock); |