projects
/
GitHub
/
LineageOS
/
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:
9298679
)
btrfs: check link counter overflow in link(2)
author
Al Viro
<viro@ZenIV.linux.org.uk>
Fri, 4 Mar 2011 17:15:18 +0000
(17:15 +0000)
committer
root
<Chris Mason chris.mason@oracle.com>
Mon, 28 Mar 2011 09:37:56 +0000
(
05:37
-0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/inode.c
b/fs/btrfs/inode.c
index 4822b3132784e4c7c338e870d9a555234ee030fd..04babaf31a335ef295806af0cc3968be438e7cbb 100644
(file)
--- a/
fs/btrfs/inode.c
+++ b/
fs/btrfs/inode.c
@@
-4837,6
+4837,9
@@
static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
if (root->objectid != BTRFS_I(inode)->root->objectid)
return -EXDEV;
+ if (inode->i_nlink == ~0U)
+ return -EMLINK;
+
btrfs_inc_nlink(inode);
inode->i_ctime = CURRENT_TIME;