Skip to contentSkip to conversation

nfsd: fix BUG at fs/nfsd/nfsfh.h:199 on unlink

PATCH New J. Bruce Fields 1 participant 1 message Oct 13, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfsd: fix BUG at fs/nfsd/nfsfh.h:199 on unlink

From: J. Bruce Fields <[email protected]>

As of commit 43a9aa64a2f4330a9cb59aaf5c5636566bce067c "NFSD:
Fill in WCC data for REMOVE, RMDIR, MKNOD, and MKDIR", we sometimes call fh_unlock on a filehandle that isn't fully initialized.

We should fix up the callers, but as a quick fix it is also sufficient just to remove this assertion.

---
 fs/nfsd/nfsfh.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

This is a regression from 2.6.35. Also available from the for-2.6.36 branch at:

git://linux-nfs.org/~bfields/linux.git for-2.6.36

 fs/nfsd/nfsfh.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
fs/nfsd/nfsfh.h +0 -2
index cdfb8c6..c16f8d8 100644
@@ -196,8 +196,6 @@ fh_lock(struct svc_fh *fhp)
 static inline void
 fh_unlock(struct svc_fh *fhp)
 {
-	BUG_ON(!fhp->fh_dentry);
-
 	if (fhp->fh_locked) {
 		fill_post_wcc(fhp);
 		mutex_unlock(&fhp->fh_dentry->d_inode->i_mutex);
Signature · 1 line
1.7.2.3