From: adilger Date: Sat, 23 Apr 2005 00:15:10 +0000 (+0000) Subject: Branch: b1_4 X-Git-Tag: v1_7_100~1^25~8^2~203 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=0ca3571d8aeb157e45d18485b8b74a0cb0a93c9a;p=fs%2Flustre-release.git Branch: b1_4 Proper fix for hokey error message quieting hack, per Nathan's feedback. --- diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 8a66895..1708066 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1644,7 +1644,7 @@ static int filter_disconnect(struct obd_export *exp) } struct dentry *__filter_oa2dentry(struct obd_device *obd, - struct obdo *oa, const char *what) + struct obdo *oa, const char *what, int quiet) { struct dentry *dchild = NULL; obd_gr group = 0; @@ -1659,9 +1659,10 @@ struct dentry *__filter_oa2dentry(struct obd_device *obd, RETURN(dchild); } - if (dchild->d_inode == NULL && strcmp(what, "filter_setattr")) { - CERROR("%s: %s on non-existent object: "LPU64"\n", - obd->obd_name, what, oa->o_id); + if (dchild->d_inode == NULL) { + if (!quiet) + CERROR("%s: %s on non-existent object: "LPU64"\n", + obd->obd_name, what, oa->o_id); f_dput(dchild); RETURN(ERR_PTR(-ENOENT)); } @@ -1714,7 +1715,7 @@ static int filter_setattr(struct obd_export *exp, struct obdo *oa, int rc, rc2; ENTRY; - dentry = filter_oa2dentry(exp->exp_obd, oa); + dentry = __filter_oa2dentry(exp->exp_obd, oa, __FUNCTION__, 1); if (IS_ERR(dentry)) RETURN(PTR_ERR(dentry)); diff --git a/lustre/obdfilter/filter_internal.h b/lustre/obdfilter/filter_internal.h index e90fb60..a0fcee7 100644 --- a/lustre/obdfilter/filter_internal.h +++ b/lustre/obdfilter/filter_internal.h @@ -100,8 +100,8 @@ void f_dput(struct dentry *); struct dentry *filter_fid2dentry(struct obd_device *, struct dentry *dir, obd_gr group, obd_id id); struct dentry *__filter_oa2dentry(struct obd_device *obd, struct obdo *oa, - const char *what); -#define filter_oa2dentry(obd, oa) __filter_oa2dentry(obd, oa, __FUNCTION__) + const char *what, int quiet); +#define filter_oa2dentry(obd, oa) __filter_oa2dentry(obd, oa, __FUNCTION__, 0) int filter_finish_transno(struct obd_export *, struct obd_trans_info *, int rc); __u64 filter_next_id(struct filter_obd *, struct obdo *);