Loading fs/f2fs/dir.c +6 −16 Original line number Original line Diff line number Diff line Loading @@ -341,24 +341,14 @@ int update_dent_inode(struct inode *inode, struct inode *to, void do_make_empty_dir(struct inode *inode, struct inode *parent, void do_make_empty_dir(struct inode *inode, struct inode *parent, struct f2fs_dentry_ptr *d) struct f2fs_dentry_ptr *d) { { struct f2fs_dir_entry *de; struct qstr dot = QSTR_INIT(".", 1); struct qstr dotdot = QSTR_INIT("..", 2); de = &d->dentry[0]; de->name_len = cpu_to_le16(1); de->hash_code = 0; de->ino = cpu_to_le32(inode->i_ino); memcpy(d->filename[0], ".", 1); set_de_type(de, inode->i_mode); de = &d->dentry[1]; /* update dirent of "." */ de->hash_code = 0; f2fs_update_dentry(inode->i_ino, inode->i_mode, d, &dot, 0, 0); de->name_len = cpu_to_le16(2); de->ino = cpu_to_le32(parent->i_ino); memcpy(d->filename[1], "..", 2); set_de_type(de, parent->i_mode); test_and_set_bit_le(0, (void *)d->bitmap); /* update dirent of ".." */ test_and_set_bit_le(1, (void *)d->bitmap); f2fs_update_dentry(parent->i_ino, parent->i_mode, d, &dotdot, 0, 1); } } static int make_empty_dir(struct inode *inode, static int make_empty_dir(struct inode *inode, Loading Loading
fs/f2fs/dir.c +6 −16 Original line number Original line Diff line number Diff line Loading @@ -341,24 +341,14 @@ int update_dent_inode(struct inode *inode, struct inode *to, void do_make_empty_dir(struct inode *inode, struct inode *parent, void do_make_empty_dir(struct inode *inode, struct inode *parent, struct f2fs_dentry_ptr *d) struct f2fs_dentry_ptr *d) { { struct f2fs_dir_entry *de; struct qstr dot = QSTR_INIT(".", 1); struct qstr dotdot = QSTR_INIT("..", 2); de = &d->dentry[0]; de->name_len = cpu_to_le16(1); de->hash_code = 0; de->ino = cpu_to_le32(inode->i_ino); memcpy(d->filename[0], ".", 1); set_de_type(de, inode->i_mode); de = &d->dentry[1]; /* update dirent of "." */ de->hash_code = 0; f2fs_update_dentry(inode->i_ino, inode->i_mode, d, &dot, 0, 0); de->name_len = cpu_to_le16(2); de->ino = cpu_to_le32(parent->i_ino); memcpy(d->filename[1], "..", 2); set_de_type(de, parent->i_mode); test_and_set_bit_le(0, (void *)d->bitmap); /* update dirent of ".." */ test_and_set_bit_le(1, (void *)d->bitmap); f2fs_update_dentry(parent->i_ino, parent->i_mode, d, &dotdot, 0, 1); } } static int make_empty_dir(struct inode *inode, static int make_empty_dir(struct inode *inode, Loading