Commit c8aebb0c9f8c7471643d5f8ba68328de8013005f
1 parent
4162cf6497
Exists in
master
and in
7 other branches
per-superblock default ->d_op
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 2 changed files with 5 additions and 0 deletions Side-by-side Diff
fs/dcache.c
| ... | ... | @@ -1320,6 +1320,7 @@ |
| 1320 | 1320 | __dget_dlock(parent); |
| 1321 | 1321 | dentry->d_parent = parent; |
| 1322 | 1322 | dentry->d_sb = parent->d_sb; |
| 1323 | + d_set_d_op(dentry, dentry->d_sb->s_d_op); | |
| 1323 | 1324 | list_add(&dentry->d_u.d_child, &parent->d_subdirs); |
| 1324 | 1325 | spin_unlock(&parent->d_lock); |
| 1325 | 1326 | } |
| ... | ... | @@ -1335,6 +1336,7 @@ |
| 1335 | 1336 | struct dentry *dentry = d_alloc(NULL, name); |
| 1336 | 1337 | if (dentry) { |
| 1337 | 1338 | dentry->d_sb = sb; |
| 1339 | + d_set_d_op(dentry, dentry->d_sb->s_d_op); | |
| 1338 | 1340 | dentry->d_parent = dentry; |
| 1339 | 1341 | dentry->d_flags |= DCACHE_DISCONNECTED; |
| 1340 | 1342 | } |
| ... | ... | @@ -1507,6 +1509,7 @@ |
| 1507 | 1509 | res = d_alloc(NULL, &name); |
| 1508 | 1510 | if (res) { |
| 1509 | 1511 | res->d_sb = root_inode->i_sb; |
| 1512 | + d_set_d_op(res, res->d_sb->s_d_op); | |
| 1510 | 1513 | res->d_parent = res; |
| 1511 | 1514 | d_instantiate(res, root_inode); |
| 1512 | 1515 | } |
| ... | ... | @@ -1567,6 +1570,7 @@ |
| 1567 | 1570 | /* attach a disconnected dentry */ |
| 1568 | 1571 | spin_lock(&tmp->d_lock); |
| 1569 | 1572 | tmp->d_sb = inode->i_sb; |
| 1573 | + d_set_d_op(tmp, tmp->d_sb->s_d_op); | |
| 1570 | 1574 | tmp->d_inode = inode; |
| 1571 | 1575 | tmp->d_flags |= DCACHE_DISCONNECTED; |
| 1572 | 1576 | list_add(&tmp->d_alias, &inode->i_dentry); |
include/linux/fs.h