Commit 193deee1 authored by Al Viro's avatar Al Viro

lustre: kill the pointless wrapper

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 84d08fa8
...@@ -60,8 +60,6 @@ truncate_complete_page(struct address_space *mapping, struct page *page) ...@@ -60,8 +60,6 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
ll_delete_from_page_cache(page); ll_delete_from_page_cache(page);
} }
# define d_refcount(d) d_count(d)
#ifdef ATTR_OPEN #ifdef ATTR_OPEN
# define ATTR_FROM_OPEN ATTR_OPEN # define ATTR_FROM_OPEN ATTR_OPEN
#else #else
......
...@@ -99,7 +99,7 @@ static inline void l_dput(struct dentry *de) ...@@ -99,7 +99,7 @@ static inline void l_dput(struct dentry *de)
if (!de || IS_ERR(de)) if (!de || IS_ERR(de))
return; return;
//shrink_dcache_parent(de); //shrink_dcache_parent(de);
LASSERT(d_refcount(de) > 0); LASSERT(d_count(de) > 0);
dput(de); dput(de);
} }
......
...@@ -98,7 +98,7 @@ int ll_dcompare(const struct dentry *parent, const struct inode *pinode, ...@@ -98,7 +98,7 @@ int ll_dcompare(const struct dentry *parent, const struct inode *pinode,
CDEBUG(D_DENTRY, "found name %.*s(%p) flags %#x refc %d\n", CDEBUG(D_DENTRY, "found name %.*s(%p) flags %#x refc %d\n",
name->len, name->name, dentry, dentry->d_flags, name->len, name->name, dentry, dentry->d_flags,
d_refcount(dentry)); d_count(dentry));
/* mountpoint is always valid */ /* mountpoint is always valid */
if (d_mountpoint((struct dentry *)dentry)) if (d_mountpoint((struct dentry *)dentry))
...@@ -165,7 +165,7 @@ static int ll_ddelete(const struct dentry *de) ...@@ -165,7 +165,7 @@ static int ll_ddelete(const struct dentry *de)
list_empty(&de->d_subdirs) ? "" : "subdirs"); list_empty(&de->d_subdirs) ? "" : "subdirs");
/* kernel >= 2.6.38 last refcount is decreased after this function. */ /* kernel >= 2.6.38 last refcount is decreased after this function. */
LASSERT(d_refcount(de) == 1); LASSERT(d_count(de) == 1);
/* Disable this piece of code temproarily because this is called /* Disable this piece of code temproarily because this is called
* inside dcache_lock so it's not appropriate to do lots of work * 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,7 +190,7 @@ static int ll_set_dd(struct dentry *de)
CDEBUG(D_DENTRY, "ldd on dentry %.*s (%p) parent %p inode %p refc %d\n", CDEBUG(D_DENTRY, "ldd on dentry %.*s (%p) parent %p inode %p refc %d\n",
de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode, de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode,
d_refcount(de)); d_count(de));
if (de->d_fsdata == NULL) { if (de->d_fsdata == NULL) {
struct ll_dentry_data *lld; struct ll_dentry_data *lld;
...@@ -540,7 +540,7 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags, ...@@ -540,7 +540,7 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags,
CDEBUG(D_DENTRY, "revalidated dentry %.*s (%p) parent %p " CDEBUG(D_DENTRY, "revalidated dentry %.*s (%p) parent %p "
"inode %p refc %d\n", de->d_name.len, "inode %p refc %d\n", de->d_name.len,
de->d_name.name, de, de->d_parent, de->d_inode, de->d_name.name, de, de->d_parent, de->d_inode,
d_refcount(de)); d_count(de));
ll_set_lock_data(exp, de->d_inode, it, &bits); ll_set_lock_data(exp, de->d_inode, it, &bits);
......
...@@ -1529,12 +1529,12 @@ static inline void d_lustre_invalidate(struct dentry *dentry, int nested) ...@@ -1529,12 +1529,12 @@ static inline void d_lustre_invalidate(struct dentry *dentry, int nested)
{ {
CDEBUG(D_DENTRY, "invalidate dentry %.*s (%p) parent %p inode %p " CDEBUG(D_DENTRY, "invalidate dentry %.*s (%p) parent %p inode %p "
"refc %d\n", dentry->d_name.len, dentry->d_name.name, dentry, "refc %d\n", dentry->d_name.len, dentry->d_name.name, dentry,
dentry->d_parent, dentry->d_inode, d_refcount(dentry)); dentry->d_parent, dentry->d_inode, d_count(dentry));
spin_lock_nested(&dentry->d_lock, spin_lock_nested(&dentry->d_lock,
nested ? DENTRY_D_LOCK_NESTED : DENTRY_D_LOCK_NORMAL); nested ? DENTRY_D_LOCK_NESTED : DENTRY_D_LOCK_NORMAL);
__d_lustre_invalidate(dentry); __d_lustre_invalidate(dentry);
if (d_refcount(dentry) == 0) if (d_count(dentry) == 0)
__d_drop(dentry); __d_drop(dentry);
spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock);
} }
......
...@@ -659,7 +659,7 @@ void lustre_dump_dentry(struct dentry *dentry, int recur) ...@@ -659,7 +659,7 @@ void lustre_dump_dentry(struct dentry *dentry, int recur)
" flags=0x%x, fsdata=%p, %d subdirs\n", dentry, " flags=0x%x, fsdata=%p, %d subdirs\n", dentry,
dentry->d_name.len, dentry->d_name.name, dentry->d_name.len, dentry->d_name.name,
dentry->d_parent->d_name.len, dentry->d_parent->d_name.name, dentry->d_parent->d_name.len, dentry->d_parent->d_name.name,
dentry->d_parent, dentry->d_inode, d_refcount(dentry), dentry->d_parent, dentry->d_inode, d_count(dentry),
dentry->d_flags, dentry->d_fsdata, subdirs); dentry->d_flags, dentry->d_fsdata, subdirs);
if (dentry->d_inode != NULL) if (dentry->d_inode != NULL)
ll_dump_inode(dentry->d_inode); ll_dump_inode(dentry->d_inode);
......
...@@ -409,7 +409,7 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de) ...@@ -409,7 +409,7 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de)
iput(inode); iput(inode);
CDEBUG(D_DENTRY, CDEBUG(D_DENTRY,
"Reuse dentry %p inode %p refc %d flags %#x\n", "Reuse dentry %p inode %p refc %d flags %#x\n",
new, new->d_inode, d_refcount(new), new->d_flags); new, new->d_inode, d_count(new), new->d_flags);
return new; return new;
} }
} }
...@@ -417,7 +417,7 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de) ...@@ -417,7 +417,7 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de)
__d_lustre_invalidate(de); __d_lustre_invalidate(de);
d_add(de, inode); d_add(de, inode);
CDEBUG(D_DENTRY, "Add dentry %p inode %p refc %d flags %#x\n", CDEBUG(D_DENTRY, "Add dentry %p inode %p refc %d flags %#x\n",
de, de->d_inode, d_refcount(de), de->d_flags); de, de->d_inode, d_count(de), de->d_flags);
return de; return de;
} }
......
...@@ -121,8 +121,8 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx, ...@@ -121,8 +121,8 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
OBD_SET_CTXT_MAGIC(save); OBD_SET_CTXT_MAGIC(save);
save->fs = get_fs(); save->fs = get_fs();
LASSERT(d_refcount(cfs_fs_pwd(current->fs))); LASSERT(d_count(cfs_fs_pwd(current->fs)));
LASSERT(d_refcount(new_ctx->pwd)); LASSERT(d_count(new_ctx->pwd));
save->pwd = dget(cfs_fs_pwd(current->fs)); save->pwd = dget(cfs_fs_pwd(current->fs));
save->pwdmnt = mntget(cfs_fs_mnt(current->fs)); save->pwdmnt = mntget(cfs_fs_mnt(current->fs));
save->luc.luc_umask = current_umask(); save->luc.luc_umask = current_umask();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment