diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-02 11:41:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-02 11:41:01 -0700 |
commit | d211858837ff8d8e31942ca7d27e6e08b3b46f5e (patch) | |
tree | a8ec83a791066e64ad02052498dbe39ebefacab9 /fs/ext3/namei.c | |
parent | f1f8935a5c38a2c61e86a42bc971a2539eef2211 (diff) | |
parent | f0023bc617ba600956b9226f1806033d7486c8ba (diff) | |
download | linux-3.10-d211858837ff8d8e31942ca7d27e6e08b3b46f5e.tar.gz linux-3.10-d211858837ff8d8e31942ca7d27e6e08b3b46f5e.tar.bz2 linux-3.10-d211858837ff8d8e31942ca7d27e6e08b3b46f5e.zip |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue:
vfs: add d_prune dentry operation
vfs: protect i_nlink
filesystems: add set_nlink()
filesystems: add missing nlink wrappers
logfs: remove unnecessary nlink setting
ocfs2: remove unnecessary nlink setting
jfs: remove unnecessary nlink setting
hypfs: remove unnecessary nlink setting
vfs: ignore error on forced remount
readlinkat: ensure we return ENOENT for the empty pathname for normal lookups
vfs: fix dentry leak in simple_fill_super()
Diffstat (limited to 'fs/ext3/namei.c')
-rw-r--r-- | fs/ext3/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 0629e09f651..642dc6d66df 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -1821,7 +1821,7 @@ retry: de->name_len = 2; strcpy (de->name, ".."); ext3_set_de_type(dir->i_sb, de, S_IFDIR); - inode->i_nlink = 2; + set_nlink(inode, 2); BUFFER_TRACE(dir_block, "call ext3_journal_dirty_metadata"); err = ext3_journal_dirty_metadata(handle, dir_block); if (err) @@ -1833,7 +1833,7 @@ retry: if (err) { out_clear_inode: - inode->i_nlink = 0; + clear_nlink(inode); unlock_new_inode(inode); ext3_mark_inode_dirty(handle, inode); iput (inode); @@ -2170,7 +2170,7 @@ static int ext3_unlink(struct inode * dir, struct dentry *dentry) ext3_warning (inode->i_sb, "ext3_unlink", "Deleting nonexistent file (%lu), %d", inode->i_ino, inode->i_nlink); - inode->i_nlink = 1; + set_nlink(inode, 1); } retval = ext3_delete_entry(handle, dir, de, bh); if (retval) |