]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.31.8/0013-ext4-Allow-rename-to-create-more-than-EXT4_LINK_MAX-.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.31.8 / 0013-ext4-Allow-rename-to-create-more-than-EXT4_LINK_MAX-.patch
CommitLineData
7f041dd7
GKH
1From 596184d7832b868c8ebce9de87058f4ee101d887 Mon Sep 17 00:00:00 2001
2From: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
3Date: Fri, 28 Aug 2009 21:43:15 -0400
4Subject: [PATCH 13/85] ext4: Allow rename to create more than EXT4_LINK_MAX subdirectories
5
6(cherry picked from commit 2c94eb86c66e1eaaa1e7d8a2120f4fad5e7e7736)
7
8Use EXT4_DIR_LINK_MAX so that rename() can move a directory into new
9parent directory without running into the EXT4_LINK_MAX limit.
10
11Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13---
14 fs/ext4/namei.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17--- a/fs/ext4/namei.c
18+++ b/fs/ext4/namei.c
19@@ -2413,7 +2413,7 @@ static int ext4_rename(struct inode *old
20 goto end_rename;
21 retval = -EMLINK;
22 if (!new_inode && new_dir != old_dir &&
23- new_dir->i_nlink >= EXT4_LINK_MAX)
24+ EXT4_DIR_LINK_MAX(new_dir))
25 goto end_rename;
26 }
27 if (!new_bh) {