linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: Allow rename even if link count is greater than EXT4_LINK_MAX for index directories
@ 2009-08-26 11:37 Aneesh Kumar K.V
  2009-08-29  1:51 ` Theodore Tso
  0 siblings, 1 reply; 2+ messages in thread
From: Aneesh Kumar K.V @ 2009-08-26 11:37 UTC (permalink / raw)
  To: cmm, tytso, sandeen, adilger; +Cc: linux-ext4, Aneesh Kumar K.V

With EXT4_FEATURE_RO_COMPAT_DIR_NLINK we enable more than EXT4_LINK_MAX
sub directories. So we should not fail rename with too many links error
if EXT4_FEATURE_RO_COMPAT_DIR_NLINK feature is set.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 fs/ext4/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index de04013..9d0db97 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2413,7 +2413,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
 			goto end_rename;
 		retval = -EMLINK;
 		if (!new_inode && new_dir != old_dir &&
-				new_dir->i_nlink >= EXT4_LINK_MAX)
+					EXT4_DIR_LINK_MAX(new_dir))
 			goto end_rename;
 	}
 	if (!new_bh) {
-- 
1.6.4.1.196.g31f0b


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext4: Allow rename even if link count is greater than EXT4_LINK_MAX for index directories
  2009-08-26 11:37 [PATCH] ext4: Allow rename even if link count is greater than EXT4_LINK_MAX for index directories Aneesh Kumar K.V
@ 2009-08-29  1:51 ` Theodore Tso
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2009-08-29  1:51 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: cmm, sandeen, adilger, linux-ext4

On Wed, Aug 26, 2009 at 05:07:25PM +0530, Aneesh Kumar K.V wrote:
> With EXT4_FEATURE_RO_COMPAT_DIR_NLINK we enable more than EXT4_LINK_MAX
> sub directories. So we should not fail rename with too many links error
> if EXT4_FEATURE_RO_COMPAT_DIR_NLINK feature is set.

Thanks, added to the ext4 patch queue.

						- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-29  1:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-26 11:37 [PATCH] ext4: Allow rename even if link count is greater than EXT4_LINK_MAX for index directories Aneesh Kumar K.V
2009-08-29  1:51 ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).