diff options
author | Tao Ma <boyu.mt@taobao.com> | 2012-12-10 14:05:58 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-12-10 14:05:58 -0500 |
commit | 978fef914a2e6b8ad5672d0a39f9201b7aa7c396 (patch) | |
tree | 1b86969eeb25b92d1b206d9168bd4bf309537c0c /fs/ext4/ext4.h | |
parent | 226ba972b0863783ad377f741f6ff0538f31ab00 (diff) |
ext4: create __ext4_insert_dentry for dir entry insertion
The old add_dirent_to_buf handles all the work related to the
work of adding dir entry to a dir block. Now we have inline data,
so create 2 new function __ext4_find_dest_de and __ext4_insert_dentry
that do the real work and let add_dirent_to_buf call them.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 59cbf498fd5f..8e9e94cf1bca 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -1969,6 +1969,21 @@ extern int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, | |||
1969 | __u32 minor_hash, | 1969 | __u32 minor_hash, |
1970 | struct ext4_dir_entry_2 *dirent); | 1970 | struct ext4_dir_entry_2 *dirent); |
1971 | extern void ext4_htree_free_dir_info(struct dir_private_info *p); | 1971 | extern void ext4_htree_free_dir_info(struct dir_private_info *p); |
1972 | extern int ext4_find_dest_de(struct inode *dir, struct inode *inode, | ||
1973 | struct buffer_head *bh, | ||
1974 | void *buf, int buf_size, | ||
1975 | const char *name, int namelen, | ||
1976 | struct ext4_dir_entry_2 **dest_de); | ||
1977 | void ext4_insert_dentry(struct inode *inode, | ||
1978 | struct ext4_dir_entry_2 *de, | ||
1979 | int buf_size, | ||
1980 | const char *name, int namelen); | ||
1981 | static inline void ext4_update_dx_flag(struct inode *inode) | ||
1982 | { | ||
1983 | if (!EXT4_HAS_COMPAT_FEATURE(inode->i_sb, | ||
1984 | EXT4_FEATURE_COMPAT_DIR_INDEX)) | ||
1985 | ext4_clear_inode_flag(inode, EXT4_INODE_INDEX); | ||
1986 | } | ||
1972 | 1987 | ||
1973 | /* fsync.c */ | 1988 | /* fsync.c */ |
1974 | extern int ext4_sync_file(struct file *, loff_t, loff_t, int); | 1989 | extern int ext4_sync_file(struct file *, loff_t, loff_t, int); |