diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-25 16:01:21 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-08 02:55:03 -0500 |
commit | 53dc9a67769d0a9733adb5156adfc07edcbc1ea3 (patch) | |
tree | 2ef179022f98e0818492b85c339978c51319d951 /fs/f2fs/dir.c | |
parent | 3a142ed962958d3063f648738a3384ab90017100 (diff) |
f2fs: init_dent_inode() should take qstr
for one thing, it doesn't (and shouldn't) use anything else from dentry;
for another, on some call chains the dentry is fake and should
be eliminated completely.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r-- | fs/f2fs/dir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 951ed52748f6..51332291b4bd 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c | |||
@@ -265,7 +265,7 @@ void f2fs_set_link(struct inode *dir, struct f2fs_dir_entry *de, | |||
265 | mutex_unlock_op(sbi, DENTRY_OPS); | 265 | mutex_unlock_op(sbi, DENTRY_OPS); |
266 | } | 266 | } |
267 | 267 | ||
268 | void init_dent_inode(struct dentry *dentry, struct page *ipage) | 268 | void init_dent_inode(const struct qstr *name, struct page *ipage) |
269 | { | 269 | { |
270 | struct f2fs_node *rn; | 270 | struct f2fs_node *rn; |
271 | 271 | ||
@@ -274,10 +274,10 @@ void init_dent_inode(struct dentry *dentry, struct page *ipage) | |||
274 | 274 | ||
275 | wait_on_page_writeback(ipage); | 275 | wait_on_page_writeback(ipage); |
276 | 276 | ||
277 | /* copy dentry info. to this inode page */ | 277 | /* copy name info. to this inode page */ |
278 | rn = (struct f2fs_node *)page_address(ipage); | 278 | rn = (struct f2fs_node *)page_address(ipage); |
279 | rn->i.i_namelen = cpu_to_le32(dentry->d_name.len); | 279 | rn->i.i_namelen = cpu_to_le32(name->len); |
280 | memcpy(rn->i.i_name, dentry->d_name.name, dentry->d_name.len); | 280 | memcpy(rn->i.i_name, name->name, name->len); |
281 | set_page_dirty(ipage); | 281 | set_page_dirty(ipage); |
282 | } | 282 | } |
283 | 283 | ||
@@ -310,7 +310,7 @@ static int init_inode_metadata(struct inode *inode, struct dentry *dentry) | |||
310 | if (IS_ERR(ipage)) | 310 | if (IS_ERR(ipage)) |
311 | return PTR_ERR(ipage); | 311 | return PTR_ERR(ipage); |
312 | set_cold_node(inode, ipage); | 312 | set_cold_node(inode, ipage); |
313 | init_dent_inode(dentry, ipage); | 313 | init_dent_inode(&dentry->d_name, ipage); |
314 | f2fs_put_page(ipage, 1); | 314 | f2fs_put_page(ipage, 1); |
315 | } | 315 | } |
316 | if (is_inode_flag_set(F2FS_I(inode), FI_INC_LINK)) { | 316 | if (is_inode_flag_set(F2FS_I(inode), FI_INC_LINK)) { |