summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/ntfs/namei.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ntfs/namei.c b/fs/ntfs/namei.c
index cecfaabfbfe7..2952b377dda2 100644
--- a/fs/ntfs/namei.c
+++ b/fs/ntfs/namei.c
@@ -1172,10 +1172,7 @@ static int __ntfs_link(struct ntfs_inode *ni, struct ntfs_inode *dir_ni,
/* Create FILE_NAME attribute. */
fn_len = sizeof(struct file_name_attr) + name_len * sizeof(__le16);
- if (name_len > NTFS_MAX_NAME_LEN) {
- err = -EIO;
- goto err_out;
- }
+
fn = kzalloc(fn_len, GFP_NOFS);
if (!fn) {
err = -ENOMEM;