Loading fs/f2fs/f2fs.h +11 −0 Original line number Original line Diff line number Diff line Loading @@ -1454,6 +1454,17 @@ static inline void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi) sbi->sb->s_flags |= MS_RDONLY; sbi->sb->s_flags |= MS_RDONLY; } } static inline bool is_dot_dotdot(const struct qstr *str) { if (str->len == 1 && str->name[0] == '.') return true; if (str->len == 2 && str->name[0] == '.' && str->name[1] == '.') return true; return false; } #define get_inode_mode(i) \ #define get_inode_mode(i) \ ((is_inode_flag_set(F2FS_I(i), FI_ACL_MODE)) ? \ ((is_inode_flag_set(F2FS_I(i), FI_ACL_MODE)) ? \ (F2FS_I(i)->i_acl_mode) : ((i)->i_mode)) (F2FS_I(i)->i_acl_mode) : ((i)->i_mode)) Loading fs/f2fs/hash.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -79,8 +79,7 @@ f2fs_hash_t f2fs_dentry_hash(const struct qstr *name_info) const unsigned char *name = name_info->name; const unsigned char *name = name_info->name; size_t len = name_info->len; size_t len = name_info->len; if ((len <= 2) && (name[0] == '.') && if (is_dot_dotdot(name_info)) (name[1] == '.' || name[1] == '\0')) return 0; return 0; /* Initialize the default seed for the hash checksum functions */ /* Initialize the default seed for the hash checksum functions */ Loading Loading
fs/f2fs/f2fs.h +11 −0 Original line number Original line Diff line number Diff line Loading @@ -1454,6 +1454,17 @@ static inline void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi) sbi->sb->s_flags |= MS_RDONLY; sbi->sb->s_flags |= MS_RDONLY; } } static inline bool is_dot_dotdot(const struct qstr *str) { if (str->len == 1 && str->name[0] == '.') return true; if (str->len == 2 && str->name[0] == '.' && str->name[1] == '.') return true; return false; } #define get_inode_mode(i) \ #define get_inode_mode(i) \ ((is_inode_flag_set(F2FS_I(i), FI_ACL_MODE)) ? \ ((is_inode_flag_set(F2FS_I(i), FI_ACL_MODE)) ? \ (F2FS_I(i)->i_acl_mode) : ((i)->i_mode)) (F2FS_I(i)->i_acl_mode) : ((i)->i_mode)) Loading
fs/f2fs/hash.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -79,8 +79,7 @@ f2fs_hash_t f2fs_dentry_hash(const struct qstr *name_info) const unsigned char *name = name_info->name; const unsigned char *name = name_info->name; size_t len = name_info->len; size_t len = name_info->len; if ((len <= 2) && (name[0] == '.') && if (is_dot_dotdot(name_info)) (name[1] == '.' || name[1] == '\0')) return 0; return 0; /* Initialize the default seed for the hash checksum functions */ /* Initialize the default seed for the hash checksum functions */ Loading