diff options
author | Jaegeuk Kim | 2013-03-03 13:58:05 +0900 |
---|---|---|
committer | Jaegeuk Kim | 2013-03-18 21:00:35 +0900 |
commit | 5a20d339c785d98d8b050b9afc098e4184a6098c (patch) | |
tree | 444a543268e5bf03d42926da8db7f9c43ba5c4bd /fs/f2fs/dir.c | |
parent | 3aa770a9c9d077283b1aa07e8549a4fdc41fc5ed (diff) |
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index a1f38443ecee..2851ae6948a1 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; |