From e89bea86e6eb1c4b8e735271d4ee6ddcd8b0fe89 Mon Sep 17 00:00:00 2001 From: Andrew Perepechko Date: Thu, 30 Sep 2010 16:32:46 +0400 Subject: [PATCH] b=22107 a fix for the warning message in filter_destroy_internal filter_destroy_internal is entered with inode references from lookup and from the resource used by the extent lock, so the check is changed to i_count != 2. i=Vitaly Fertman i=Johann Lombardi --- lustre/obdfilter/filter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 6ae7c4f..a498a66 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1595,7 +1595,10 @@ static int filter_destroy_internal(struct obd_device *obd, obd_id objid, struct inode *inode = dchild->d_inode; int rc; - if (inode->i_nlink != 1 || atomic_read(&inode->i_count) != 1) { + /* There should be 2 references to the inode: + * 1) taken by filter_prepare_destroy + * 2) taken by filter_destroy */ + if (inode->i_nlink != 1 || atomic_read(&inode->i_count) != 2) { CERROR("destroying objid %.*s ino %lu nlink %lu count %d\n", dchild->d_name.len, dchild->d_name.name, inode->i_ino, (unsigned long)inode->i_nlink, -- 1.8.3.1