summaryrefslogtreecommitdiff
path: root/fs/f2fs/dir.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-03 04:58:05 (GMT)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-18 12:00:35 (GMT)
commit5a20d339c785d98d8b050b9afc098e4184a6098c (patch)
tree444a543268e5bf03d42926da8db7f9c43ba5c4bd /fs/f2fs/dir.c
parent3aa770a9c9d077283b1aa07e8549a4fdc41fc5ed (diff)
downloadlinux-5a20d339c785d98d8b050b9afc098e4184a6098c.tar.xz
f2fs: align f2fs maximum name length to linux based filesystem
The maximum filename length supported in linux is 255 characters. So let's follow that. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r--fs/f2fs/dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index a1f3844..2851ae6 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -189,6 +189,9 @@ struct f2fs_dir_entry *f2fs_find_entry(struct inode *dir,
unsigned int max_depth;
unsigned int level;
+ if (namelen > F2FS_NAME_LEN)
+ return NULL;
+
if (npages == 0)
return NULL;