Loading fs/f2fs/namei.c +6 −6 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ #include "acl.h" #include <trace/events/f2fs.h> static inline int is_extension_exist(const unsigned char *s, const char *sub, static inline bool is_extension_exist(const unsigned char *s, const char *sub, bool tmp_ext) { size_t slen = strlen(s); Loading @@ -30,19 +30,19 @@ static inline int is_extension_exist(const unsigned char *s, const char *sub, int i; if (sublen == 1 && *sub == '*') return 1; return true; /* * filename format of multimedia file should be defined as: * "filename + '.' + extension + (optional: '.' + temp extension)". */ if (slen < sublen + 2) return 0; return false; if (!tmp_ext) { /* file has no temp extension */ if (s[slen - sublen - 1] != '.') return 0; return false; return !strncasecmp(s + slen - sublen, sub, sublen); } Loading @@ -50,10 +50,10 @@ static inline int is_extension_exist(const unsigned char *s, const char *sub, if (s[i] != '.') continue; if (!strncasecmp(s + i + 1, sub, sublen)) return 1; return true; } return 0; return false; } int f2fs_update_extension_list(struct f2fs_sb_info *sbi, const char *name, Loading Loading
fs/f2fs/namei.c +6 −6 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ #include "acl.h" #include <trace/events/f2fs.h> static inline int is_extension_exist(const unsigned char *s, const char *sub, static inline bool is_extension_exist(const unsigned char *s, const char *sub, bool tmp_ext) { size_t slen = strlen(s); Loading @@ -30,19 +30,19 @@ static inline int is_extension_exist(const unsigned char *s, const char *sub, int i; if (sublen == 1 && *sub == '*') return 1; return true; /* * filename format of multimedia file should be defined as: * "filename + '.' + extension + (optional: '.' + temp extension)". */ if (slen < sublen + 2) return 0; return false; if (!tmp_ext) { /* file has no temp extension */ if (s[slen - sublen - 1] != '.') return 0; return false; return !strncasecmp(s + slen - sublen, sub, sublen); } Loading @@ -50,10 +50,10 @@ static inline int is_extension_exist(const unsigned char *s, const char *sub, if (s[i] != '.') continue; if (!strncasecmp(s + i + 1, sub, sublen)) return 1; return true; } return 0; return false; } int f2fs_update_extension_list(struct f2fs_sb_info *sbi, const char *name, Loading