From 9485fc2dc17e974f12fa65c7712f03ce21d41234 Mon Sep 17 00:00:00 2001 From: braam Date: Mon, 16 Sep 2002 21:27:49 +0000 Subject: [PATCH] - a fix for single node rm `pwd` problems. The distributed case is more involved and we'll have to see about that. --- lustre/llite/namei.c | 8 +++++++- lustre/mds/mds_reint.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index fb5e36e..124e383 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -611,8 +611,10 @@ static int ll_common_unlink(struct inode *dir, struct dentry *dentry, __u32 mode) { struct inode * inode = dentry->d_inode; +#if 0 struct ext2_dir_entry_2 * de; struct page * page; +#endif int err = -ENOENT; if (dentry->d_it && dentry->d_it->it_disposition) { @@ -621,18 +623,22 @@ static int ll_common_unlink(struct inode *dir, struct dentry *dentry, GOTO(out, err); } +#if 0 de = ext2_find_entry(dir, dentry, &page); if (!de) goto out; - +#endif err = ll_mdc_unlink(dir, dentry->d_inode, mode, dentry->d_name.name, dentry->d_name.len); if (err) goto out; +#if 0 err = ext2_delete_entry(de, page); if (err) goto out; +#endif + invalidate_inode_pages(dir); inode->i_ctime = dir->i_ctime; out: diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index c4c244a..6f9ddee 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -416,7 +416,7 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset, ENTRY; /* a name was supplied by the client; fid1 is the directory */ - lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_CW : LCK_PW; + lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_PW : LCK_PW; de = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, lock_mode, &lockh); if (IS_ERR(de)) { LBUG(); -- 1.8.3.1