Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47601
b: refs/heads/master
c: 731b9a5
h: refs/heads/master
i:
  47599: 6f28ae7
v: v3
  • Loading branch information
Eric Sandeen authored and Linus Torvalds committed Feb 11, 2007
1 parent 05808d2 commit 97130cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 37 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2988a7740dc0dd9a0cb56576e8fe1d777dff0db3
refs/heads/master: 731b9a549882c76189baafccbd068d5785ea2a82
21 changes: 3 additions & 18 deletions trunk/fs/ext3/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,21 +1618,6 @@ static int ext3_delete_entry (handle_t *handle,
return -ENOENT;
}

/*
* ext3_mark_inode_dirty is somewhat expensive, so unlike ext2 we
* do not perform it in these functions. We perform it at the call site,
* if it is needed.
*/
static inline void ext3_inc_count(handle_t *handle, struct inode *inode)
{
inc_nlink(inode);
}

static inline void ext3_dec_count(handle_t *handle, struct inode *inode)
{
drop_nlink(inode);
}

static int ext3_add_nondir(handle_t *handle,
struct dentry *dentry, struct inode *inode)
{
Expand All @@ -1642,7 +1627,7 @@ static int ext3_add_nondir(handle_t *handle,
d_instantiate(dentry, inode);
return 0;
}
ext3_dec_count(handle, inode);
drop_nlink(inode);
iput(inode);
return err;
}
Expand Down Expand Up @@ -2163,7 +2148,7 @@ static int ext3_symlink (struct inode * dir,
err = __page_symlink(inode, symname, l,
mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
if (err) {
ext3_dec_count(handle, inode);
drop_nlink(inode);
ext3_mark_inode_dirty(handle, inode);
iput (inode);
goto out_stop;
Expand Down Expand Up @@ -2208,7 +2193,7 @@ static int ext3_link (struct dentry * old_dentry,
handle->h_sync = 1;

inode->i_ctime = CURRENT_TIME_SEC;
ext3_inc_count(handle, inode);
inc_nlink(inode);
atomic_inc(&inode->i_count);

err = ext3_add_nondir(handle, dentry, inode);
Expand Down
21 changes: 3 additions & 18 deletions trunk/fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,21 +1616,6 @@ static int ext4_delete_entry (handle_t *handle,
return -ENOENT;
}

/*
* ext4_mark_inode_dirty is somewhat expensive, so unlike ext2 we
* do not perform it in these functions. We perform it at the call site,
* if it is needed.
*/
static inline void ext4_inc_count(handle_t *handle, struct inode *inode)
{
inc_nlink(inode);
}

static inline void ext4_dec_count(handle_t *handle, struct inode *inode)
{
drop_nlink(inode);
}

static int ext4_add_nondir(handle_t *handle,
struct dentry *dentry, struct inode *inode)
{
Expand All @@ -1640,7 +1625,7 @@ static int ext4_add_nondir(handle_t *handle,
d_instantiate(dentry, inode);
return 0;
}
ext4_dec_count(handle, inode);
drop_nlink(inode);
iput(inode);
return err;
}
Expand Down Expand Up @@ -2161,7 +2146,7 @@ static int ext4_symlink (struct inode * dir,
err = __page_symlink(inode, symname, l,
mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
if (err) {
ext4_dec_count(handle, inode);
drop_nlink(inode);
ext4_mark_inode_dirty(handle, inode);
iput (inode);
goto out_stop;
Expand Down Expand Up @@ -2206,7 +2191,7 @@ static int ext4_link (struct dentry * old_dentry,
handle->h_sync = 1;

inode->i_ctime = CURRENT_TIME_SEC;
ext4_inc_count(handle, inode);
inc_nlink(inode);
atomic_inc(&inode->i_count);

err = ext4_add_nondir(handle, dentry, inode);
Expand Down

0 comments on commit 97130cc

Please sign in to comment.