projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c94eb8
)
ext4: Limit number of links that can be created by ext4_link()
author
Theodore Ts'o
<tytso@mit.edu>
Sun, 30 Aug 2009 01:08:08 +0000
(21:08 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Sun, 30 Aug 2009 01:08:08 +0000
(21:08 -0400)
In ext4_link we need to check using EXT4_LINK_MAX, and not
EXT4_DIR_LINK_MAX(), since ext4_link() is creating hard links of
regular files, and not directories.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/namei.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ext4/namei.c
b/fs/ext4/namei.c
index ba91bd0f791613f2065293dc1059ac36534a1c34..f27c8164c1fea8b5d2b9fcd8eb6f200267a21c56 100644
(file)
--- a/
fs/ext4/namei.c
+++ b/
fs/ext4/namei.c
@@
-2318,7
+2318,7
@@
static int ext4_link(struct dentry *old_dentry,
struct inode *inode = old_dentry->d_inode;
int err, retries = 0;
- if (
EXT4_DIR_LINK_MAX(inode)
)
+ if (
inode->i_nlink >= EXT4_LINK_MAX
)
return -EMLINK;
/*