diff options
author | Daniel Phillips <daniel@tux3.org> | 2014-02-17 01:10:44 +0900 |
---|---|---|
committer | Daniel Phillips <daniel@tux3.org> | 2014-02-17 01:10:44 +0900 |
commit | 0c34f6eb877bf1c5b5a5369b0b1dba9895022a54 (patch) | |
tree | c94cf928e2600b16acf11c01e6c755b454c2ebe1 | |
parent | 706c8bf7ab11cec8a7b0666718d0c1e2d89c1b33 (diff) | |
download | linux-tux3-0c34f6eb877bf1c5b5a5369b0b1dba9895022a54.tar.gz |
tux3: Remove __tux_add_dirent
Refactoring towards choosing inode after creating directory entry.
Rename is a unique situation that does not need inode instantiation so clarify
that by calling tux_create_dirent directly. The helper then has only one
caller, so remove it.
Signed-off-by: Daniel Phillips <d.phillips@partner.samsung.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-rw-r--r-- | fs/tux3/namei.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/tux3/namei.c b/fs/tux3/namei.c index ed2489edc4086..04c5017f575bc 100644 --- a/fs/tux3/namei.c +++ b/fs/tux3/namei.c @@ -32,17 +32,11 @@ out: return d_splice_alias(inode, dentry); } -static int __tux_add_dirent(struct inode *dir, struct dentry *dentry, - struct inode *inode) -{ - return tux_create_dirent(dir, &dentry->d_name, tux_inode(inode)->inum, - inode->i_mode); -} - static int tux_add_dirent(struct inode *dir, struct dentry *dentry, struct inode *inode) { - int err = __tux_add_dirent(dir, dentry, inode); + int err = tux_create_dirent(dir, &dentry->d_name, + tux_inode(inode)->inum, inode->i_mode); if (!err) d_instantiate(dentry, inode); return err; @@ -305,7 +299,8 @@ static int tux3_rename(struct inode *old_dir, struct dentry *old_dentry, goto error; } } - err = __tux_add_dirent(new_dir, new_dentry, old_inode); + err = tux_create_dirent(new_dir, &new_dentry->d_name, + tux_inode(old_inode)->inum, old_inode->i_mode); if (err) goto error; if (new_subdir) |