This is a note to let you know that I've just added the patch titled

    fuse: don't WARN when nlink is zero

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fuse-don-t-warn-when-nlink-is-zero.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From dfca7cebc2679f3d129f8e680a8f199a7ad16e38 Mon Sep 17 00:00:00 2001
From: Miklos Szeredi <[email protected]>
Date: Mon, 4 Feb 2013 15:57:42 +0100
Subject: fuse: don't WARN when nlink is zero

From: Miklos Szeredi <[email protected]>

commit dfca7cebc2679f3d129f8e680a8f199a7ad16e38 upstream.

drop_nlink() warns if nlink is already zero.  This is triggerable by a buggy
userspace filesystem.  The cure, I think, is worse than the disease so disable
the warning.

Reported-by: Tero Roponen <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/fuse/dir.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -645,7 +645,14 @@ static int fuse_unlink(struct inode *dir
 
                spin_lock(&fc->lock);
                fi->attr_version = ++fc->attr_version;
-               drop_nlink(inode);
+               /*
+                * If i_nlink == 0 then unlink doesn't make sense, yet this can
+                * happen if userspace filesystem is careless.  It would be
+                * difficult to enforce correct nlink usage so just ignore this
+                * condition here
+                */
+               if (inode->i_nlink > 0)
+                       drop_nlink(inode);
                spin_unlock(&fc->lock);
                fuse_invalidate_attr(inode);
                fuse_invalidate_attr(dir);


Patches currently in stable-queue which might be from [email protected] are

queue-3.4/fuse-don-t-warn-when-nlink-is-zero.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to