Skip to content

Commit

Permalink
ext4: Allow rename to create more than EXT4_LINK_MAX subdirectories
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aneesh Kumar K.V authored and Theodore Ts'o committed Aug 29, 2009
1 parent 55ad63b commit 2c94eb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,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) {
Expand Down

0 comments on commit 2c94eb8

Please sign in to comment.