From: Stephen Mollett <molletts@yahoo.com>
To: bfennema@falcon.csc.calpoly.edu
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.21] udf: Decrement correct link count in udf_rmdir
Date: Tue, 1 May 2007 19:23:14 +0100 [thread overview]
Message-ID: <200705011923.14950.molletts@yahoo.com> (raw)
It appears that a minor thinko occurred in udf_rmdir and the (already-cleared)
link count on the directory that is being removed was being decremented
instead of the link count on its parent directory. This gives rise to lots of
kernel messages similar to:
UDF-fs warning (device loop1): udf_rmdir: empty directory has nlink != 2 (8)
when removing directory trees. No other ill effects have been observed but I
guess it could theoretically result in the link count overflowing on a very
long-lived, much modified directory.
Signed-off-by: Stephen Mollett <molletts@yahoo.com>
---
Patch applies cleanly to latest git snapshot and other recent 2.6 kernels.
Please CC: me as I'm not currently subscribed to linux-kernel.
First attempt at formally submitting a kernel patch - apologies if I've cocked
something up - please be nice :-)
--- linux-2.6.21/fs/udf/namei.c.orig 2007-05-01 18:52:02.000000000 +0100
+++ linux-2.6.21/fs/udf/namei.c 2007-05-01 18:53:00.000000000 +0100
@@ -878,7 +878,7 @@ static int udf_rmdir(struct inode * dir,
inode->i_nlink);
clear_nlink(inode);
inode->i_size = 0;
- inode_dec_link_count(inode);
+ inode_dec_link_count(dir);
inode->i_ctime = dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb);
mark_inode_dirty(dir);
next reply other threads:[~2007-05-01 18:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 18:23 Stephen Mollett [this message]
2007-05-01 21:00 ` [PATCH 2.6.21] udf: Decrement correct link count in udf_rmdir Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200705011923.14950.molletts@yahoo.com \
--to=molletts@yahoo.com \
--cc=bfennema@falcon.csc.calpoly.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox