diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-07-05 11:06:16 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-07-05 11:06:16 -0400 |
commit | 193deee199c55ce06bca2b3e5e2d3c10208a942a (patch) | |
tree | e540828ee7b61b3085f0906cd9cefee83847f293 /drivers/staging | |
parent | 84d08fa888e7c2d53b5bbc764db2ef02968b499c (diff) |
lustre: kill the pointless wrapper
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/staging')
7 files changed, 12 insertions, 14 deletions
diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h b/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h index 6367f4cc7361..a8e9c0c8ffd2 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h | |||
@@ -60,8 +60,6 @@ truncate_complete_page(struct address_space *mapping, struct page *page) | |||
60 | ll_delete_from_page_cache(page); | 60 | ll_delete_from_page_cache(page); |
61 | } | 61 | } |
62 | 62 | ||
63 | # define d_refcount(d) d_count(d) | ||
64 | |||
65 | #ifdef ATTR_OPEN | 63 | #ifdef ATTR_OPEN |
66 | # define ATTR_FROM_OPEN ATTR_OPEN | 64 | # define ATTR_FROM_OPEN ATTR_OPEN |
67 | #else | 65 | #else |
diff --git a/drivers/staging/lustre/lustre/include/linux/lvfs.h b/drivers/staging/lustre/lustre/include/linux/lvfs.h index b4db6cb581bd..eb59ac7d5946 100644 --- a/drivers/staging/lustre/lustre/include/linux/lvfs.h +++ b/drivers/staging/lustre/lustre/include/linux/lvfs.h | |||
@@ -99,7 +99,7 @@ static inline void l_dput(struct dentry *de) | |||
99 | if (!de || IS_ERR(de)) | 99 | if (!de || IS_ERR(de)) |
100 | return; | 100 | return; |
101 | //shrink_dcache_parent(de); | 101 | //shrink_dcache_parent(de); |
102 | LASSERT(d_refcount(de) > 0); | 102 | LASSERT(d_count(de) > 0); |
103 | dput(de); | 103 | dput(de); |
104 | } | 104 | } |
105 | 105 | ||
diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index 7d6abfff9740..ff0d085077c8 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c | |||
@@ -98,7 +98,7 @@ int ll_dcompare(const struct dentry *parent, const struct inode *pinode, | |||
98 | 98 | ||
99 | CDEBUG(D_DENTRY, "found name %.*s(%p) flags %#x refc %d\n", | 99 | CDEBUG(D_DENTRY, "found name %.*s(%p) flags %#x refc %d\n", |
100 | name->len, name->name, dentry, dentry->d_flags, | 100 | name->len, name->name, dentry, dentry->d_flags, |
101 | d_refcount(dentry)); | 101 | d_count(dentry)); |
102 | 102 | ||
103 | /* mountpoint is always valid */ | 103 | /* mountpoint is always valid */ |
104 | if (d_mountpoint((struct dentry *)dentry)) | 104 | if (d_mountpoint((struct dentry *)dentry)) |
@@ -165,7 +165,7 @@ static int ll_ddelete(const struct dentry *de) | |||
165 | list_empty(&de->d_subdirs) ? "" : "subdirs"); | 165 | list_empty(&de->d_subdirs) ? "" : "subdirs"); |
166 | 166 | ||
167 | /* kernel >= 2.6.38 last refcount is decreased after this function. */ | 167 | /* kernel >= 2.6.38 last refcount is decreased after this function. */ |
168 | LASSERT(d_refcount(de) == 1); | 168 | LASSERT(d_count(de) == 1); |
169 | 169 | ||
170 | /* Disable this piece of code temproarily because this is called | 170 | /* Disable this piece of code temproarily because this is called |
171 | * inside dcache_lock so it's not appropriate to do lots of work | 171 | * inside dcache_lock so it's not appropriate to do lots of work |
@@ -190,7 +190,7 @@ static int ll_set_dd(struct dentry *de) | |||
190 | 190 | ||
191 | CDEBUG(D_DENTRY, "ldd on dentry %.*s (%p) parent %p inode %p refc %d\n", | 191 | CDEBUG(D_DENTRY, "ldd on dentry %.*s (%p) parent %p inode %p refc %d\n", |
192 | de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode, | 192 | de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode, |
193 | d_refcount(de)); | 193 | d_count(de)); |
194 | 194 | ||
195 | if (de->d_fsdata == NULL) { | 195 | if (de->d_fsdata == NULL) { |
196 | struct ll_dentry_data *lld; | 196 | struct ll_dentry_data *lld; |
@@ -540,7 +540,7 @@ out: | |||
540 | CDEBUG(D_DENTRY, "revalidated dentry %.*s (%p) parent %p " | 540 | CDEBUG(D_DENTRY, "revalidated dentry %.*s (%p) parent %p " |
541 | "inode %p refc %d\n", de->d_name.len, | 541 | "inode %p refc %d\n", de->d_name.len, |
542 | de->d_name.name, de, de->d_parent, de->d_inode, | 542 | de->d_name.name, de, de->d_parent, de->d_inode, |
543 | d_refcount(de)); | 543 | d_count(de)); |
544 | 544 | ||
545 | ll_set_lock_data(exp, de->d_inode, it, &bits); | 545 | ll_set_lock_data(exp, de->d_inode, it, &bits); |
546 | 546 | ||
diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 992cd203ca1a..5227c5c4ebe2 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h | |||
@@ -1529,12 +1529,12 @@ static inline void d_lustre_invalidate(struct dentry *dentry, int nested) | |||
1529 | { | 1529 | { |
1530 | CDEBUG(D_DENTRY, "invalidate dentry %.*s (%p) parent %p inode %p " | 1530 | CDEBUG(D_DENTRY, "invalidate dentry %.*s (%p) parent %p inode %p " |
1531 | "refc %d\n", dentry->d_name.len, dentry->d_name.name, dentry, | 1531 | "refc %d\n", dentry->d_name.len, dentry->d_name.name, dentry, |
1532 | dentry->d_parent, dentry->d_inode, d_refcount(dentry)); | 1532 | dentry->d_parent, dentry->d_inode, d_count(dentry)); |
1533 | 1533 | ||
1534 | spin_lock_nested(&dentry->d_lock, | 1534 | spin_lock_nested(&dentry->d_lock, |
1535 | nested ? DENTRY_D_LOCK_NESTED : DENTRY_D_LOCK_NORMAL); | 1535 | nested ? DENTRY_D_LOCK_NESTED : DENTRY_D_LOCK_NORMAL); |
1536 | __d_lustre_invalidate(dentry); | 1536 | __d_lustre_invalidate(dentry); |
1537 | if (d_refcount(dentry) == 0) | 1537 | if (d_count(dentry) == 0) |
1538 | __d_drop(dentry); | 1538 | __d_drop(dentry); |
1539 | spin_unlock(&dentry->d_lock); | 1539 | spin_unlock(&dentry->d_lock); |
1540 | } | 1540 | } |
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 2311b20ee99a..afae8010623d 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c | |||
@@ -659,7 +659,7 @@ void lustre_dump_dentry(struct dentry *dentry, int recur) | |||
659 | " flags=0x%x, fsdata=%p, %d subdirs\n", dentry, | 659 | " flags=0x%x, fsdata=%p, %d subdirs\n", dentry, |
660 | dentry->d_name.len, dentry->d_name.name, | 660 | dentry->d_name.len, dentry->d_name.name, |
661 | dentry->d_parent->d_name.len, dentry->d_parent->d_name.name, | 661 | dentry->d_parent->d_name.len, dentry->d_parent->d_name.name, |
662 | dentry->d_parent, dentry->d_inode, d_refcount(dentry), | 662 | dentry->d_parent, dentry->d_inode, d_count(dentry), |
663 | dentry->d_flags, dentry->d_fsdata, subdirs); | 663 | dentry->d_flags, dentry->d_fsdata, subdirs); |
664 | if (dentry->d_inode != NULL) | 664 | if (dentry->d_inode != NULL) |
665 | ll_dump_inode(dentry->d_inode); | 665 | ll_dump_inode(dentry->d_inode); |
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 58d59aa12619..ff8f63de5612 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c | |||
@@ -409,7 +409,7 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de) | |||
409 | iput(inode); | 409 | iput(inode); |
410 | CDEBUG(D_DENTRY, | 410 | CDEBUG(D_DENTRY, |
411 | "Reuse dentry %p inode %p refc %d flags %#x\n", | 411 | "Reuse dentry %p inode %p refc %d flags %#x\n", |
412 | new, new->d_inode, d_refcount(new), new->d_flags); | 412 | new, new->d_inode, d_count(new), new->d_flags); |
413 | return new; | 413 | return new; |
414 | } | 414 | } |
415 | } | 415 | } |
@@ -417,7 +417,7 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de) | |||
417 | __d_lustre_invalidate(de); | 417 | __d_lustre_invalidate(de); |
418 | d_add(de, inode); | 418 | d_add(de, inode); |
419 | CDEBUG(D_DENTRY, "Add dentry %p inode %p refc %d flags %#x\n", | 419 | CDEBUG(D_DENTRY, "Add dentry %p inode %p refc %d flags %#x\n", |
420 | de, de->d_inode, d_refcount(de), de->d_flags); | 420 | de, de->d_inode, d_count(de), de->d_flags); |
421 | return de; | 421 | return de; |
422 | } | 422 | } |
423 | 423 | ||
diff --git a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c index 1e6f32c3549b..e70d8fe99888 100644 --- a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c +++ b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c | |||
@@ -121,8 +121,8 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx, | |||
121 | OBD_SET_CTXT_MAGIC(save); | 121 | OBD_SET_CTXT_MAGIC(save); |
122 | 122 | ||
123 | save->fs = get_fs(); | 123 | save->fs = get_fs(); |
124 | LASSERT(d_refcount(cfs_fs_pwd(current->fs))); | 124 | LASSERT(d_count(cfs_fs_pwd(current->fs))); |
125 | LASSERT(d_refcount(new_ctx->pwd)); | 125 | LASSERT(d_count(new_ctx->pwd)); |
126 | save->pwd = dget(cfs_fs_pwd(current->fs)); | 126 | save->pwd = dget(cfs_fs_pwd(current->fs)); |
127 | save->pwdmnt = mntget(cfs_fs_mnt(current->fs)); | 127 | save->pwdmnt = mntget(cfs_fs_mnt(current->fs)); |
128 | save->luc.luc_umask = current_umask(); | 128 | save->luc.luc_umask = current_umask(); |