From f151ae4471444833dd8838bf9b5ea817e542f849 Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 18 Oct 2002 06:34:08 +0000 Subject: [PATCH] Give a valid return code for the non-intent ll_unlink and ll_rmdir. -ENOENT is what ext2_unlink uses, so it must be correct... --- lustre/llite/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 1a5e9c3..c334d02 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -637,7 +637,7 @@ static int ll_common_unlink(struct inode *dir, struct dentry *dentry,__u32 mode) de = ext2_find_entry(dir, dentry, &page); if (!de) - goto out; + GOTO(out, rc = -ENOENT); rc = ll_mdc_unlink(dir, dentry->d_inode, mode, dentry->d_name.name, dentry->d_name.len); if (rc) @@ -645,7 +645,7 @@ static int ll_common_unlink(struct inode *dir, struct dentry *dentry,__u32 mode) rc = ext2_delete_entry(de, page); if (rc) - goto out; + GOTO(out, rc); /* AED: not sure if needed - directory lock revocation should do it * in the case where the client has cached it for non-intent ops. -- 1.8.3.1