summaryrefslogtreecommitdiffstats
path: root/fs/ext4/xattr.h
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2012-12-10 14:06:01 -0500
committerTheodore Ts'o <tytso@mit.edu>2012-12-10 14:06:01 -0500
commit32f7f22c0b52e8189fef83986b16dc7abe95f2c4 (patch)
treec11441065aa244746f17bf0efd322fe6dd06c04c /fs/ext4/xattr.h
parent61f86638d8a656101bb0f9c41c55d9685f8a2357 (diff)
ext4: let ext4_rename handle inline dir
In case we rename a directory, ext4_rename has to read the dir block and change its dotdot's information. The old ext4_rename encapsulated the dir_block read into itself. So this patch adds a new function ext4_get_first_dir_block() which gets the dir buffer information so the ext4_rename can handle it properly. As it will also change the parent inode number, we return the parent_de so that ext4_rename() can handle it more easily. ext4_find_entry is also changed so that the caller(rename) can tell whether the found entry is an inlined one or not and journaling the corresponding buffer head. Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/xattr.h')
-rw-r--r--fs/ext4/xattr.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h
index 7747bbcebb33..f6c3ca6dae46 100644
--- a/fs/ext4/xattr.h
+++ b/fs/ext4/xattr.h
@@ -181,6 +181,9 @@ extern int ext4_delete_inline_entry(handle_t *handle,
181 struct buffer_head *bh, 181 struct buffer_head *bh,
182 int *has_inline_data); 182 int *has_inline_data);
183extern int empty_inline_dir(struct inode *dir, int *has_inline_data); 183extern int empty_inline_dir(struct inode *dir, int *has_inline_data);
184extern struct buffer_head *ext4_get_first_inline_block(struct inode *inode,
185 struct ext4_dir_entry_2 **parent_de,
186 int *retval);
184# else /* CONFIG_EXT4_FS_XATTR */ 187# else /* CONFIG_EXT4_FS_XATTR */
185 188
186static inline int 189static inline int
@@ -387,6 +390,14 @@ static inline int empty_inline_dir(struct inode *dir, int *has_inline_data)
387{ 390{
388 return 0; 391 return 0;
389} 392}
393
394static inline struct buffer_head *
395ext4_get_first_inline_block(struct inode *inode,
396 struct ext4_dir_entry_2 **parent_de,
397 int *retval)
398{
399 return NULL;
400}
390# endif /* CONFIG_EXT4_FS_XATTR */ 401# endif /* CONFIG_EXT4_FS_XATTR */
391 402
392#ifdef CONFIG_EXT4_FS_SECURITY 403#ifdef CONFIG_EXT4_FS_SECURITY