aboutsummaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 908dd947b1ea..bb8ca7ef7094 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1379,7 +1379,7 @@ shmem_get_inode(struct super_block *sb, int mode, dev_t dev)
1379 &sbinfo->policy_nodes); 1379 &sbinfo->policy_nodes);
1380 break; 1380 break;
1381 case S_IFDIR: 1381 case S_IFDIR:
1382 inode->i_nlink++; 1382 inc_nlink(inode);
1383 /* Some things misbehave if size == 0 on a directory */ 1383 /* Some things misbehave if size == 0 on a directory */
1384 inode->i_size = 2 * BOGO_DIRENT_SIZE; 1384 inode->i_size = 2 * BOGO_DIRENT_SIZE;
1385 inode->i_op = &shmem_dir_inode_operations; 1385 inode->i_op = &shmem_dir_inode_operations;
@@ -1715,7 +1715,7 @@ static int shmem_mkdir(struct inode *dir, struct dentry *dentry, int mode)
1715 1715
1716 if ((error = shmem_mknod(dir, dentry, mode | S_IFDIR, 0))) 1716 if ((error = shmem_mknod(dir, dentry, mode | S_IFDIR, 0)))
1717 return error; 1717 return error;
1718 dir->i_nlink++; 1718 inc_nlink(dir);
1719 return 0; 1719 return 0;
1720} 1720}
1721 1721
@@ -1750,7 +1750,7 @@ static int shmem_link(struct dentry *old_dentry, struct inode *dir, struct dentr
1750 1750
1751 dir->i_size += BOGO_DIRENT_SIZE; 1751 dir->i_size += BOGO_DIRENT_SIZE;
1752 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; 1752 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
1753 inode->i_nlink++; 1753 inc_nlink(inode);
1754 atomic_inc(&inode->i_count); /* New dentry reference */ 1754 atomic_inc(&inode->i_count); /* New dentry reference */
1755 dget(dentry); /* Extra pinning count for the created dentry */ 1755 dget(dentry); /* Extra pinning count for the created dentry */
1756 d_instantiate(dentry, inode); 1756 d_instantiate(dentry, inode);
@@ -1807,7 +1807,7 @@ static int shmem_rename(struct inode *old_dir, struct dentry *old_dentry, struct
1807 drop_nlink(old_dir); 1807 drop_nlink(old_dir);
1808 } else if (they_are_dirs) { 1808 } else if (they_are_dirs) {
1809 drop_nlink(old_dir); 1809 drop_nlink(old_dir);
1810 new_dir->i_nlink++; 1810 inc_nlink(new_dir);
1811 } 1811 }
1812 1812
1813 old_dir->i_size -= BOGO_DIRENT_SIZE; 1813 old_dir->i_size -= BOGO_DIRENT_SIZE;