From: Andrew Perepechko Date: Thu, 30 Sep 2010 12:32:46 +0000 (+0400) Subject: b=22107 a fix for the warning message in filter_destroy_internal X-Git-Tag: 2.0.53.0~17 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e89bea86e6eb1c4b8e735271d4ee6ddcd8b0fe89 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 --- 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,