diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2009-08-28 21:43:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-14 08:06:17 -0800 |
commit | 929c7112197d58053117b3303f3bcf160bcdca45 (patch) | |
tree | 6b38a08608bdba469824183e68a872e78340c036 /fs | |
parent | 100acdbadc9707c6ddee16c3288759bcbe317ac1 (diff) |
ext4: Allow rename to create more than EXT4_LINK_MAX subdirectories
(cherry picked from commit 2c94eb86c66e1eaaa1e7d8a2120f4fad5e7e7736)
Use EXT4_DIR_LINK_MAX so that rename() can move a directory into new
parent directory without running into the EXT4_LINK_MAX limit.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r-- | 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 de04013d16f..9d51ab9dd9d 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) { |