diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-05-09 07:47:14 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-05-09 07:58:48 -0300 |
commit | a5cdf7364020a61375af3c8aa23e09181f5c2c6c (patch) | |
tree | 6a7aacf0e34c69ae57200ba59eafda251b3e0e80 /fs/f2fs/namei.c | |
parent | 394569928e2f17dff4ae367ac700048138e318c7 (diff) |
Linux-libre 4.5.3-gnupck-4.5.3-gnu
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r-- | fs/f2fs/namei.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 6f944e5eb..7e9e38769 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -980,12 +980,6 @@ static const char *f2fs_encrypted_get_link(struct dentry *dentry, } memcpy(cstr.name, sd->encrypted_path, cstr.len); - /* this is broken symlink case */ - if (unlikely(cstr.name[0] == 0)) { - res = -ENOENT; - goto errout; - } - if ((cstr.len + sizeof(struct f2fs_encrypted_symlink_data) - 1) > max_size) { /* Symlink data on the disk is corrupted */ @@ -1002,6 +996,12 @@ static const char *f2fs_encrypted_get_link(struct dentry *dentry, kfree(cstr.name); + /* this is broken symlink case */ + if (unlikely(pstr.name[0] == 0)) { + res = -ENOENT; + goto errout; + } + paddr = pstr.name; /* Null-terminate the name */ |