aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mqueue.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 02e6f6798972..d75d0ba83360 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -115,7 +115,6 @@ static struct inode *mqueue_get_inode(struct super_block *sb, int mode,
115 inode->i_mode = mode; 115 inode->i_mode = mode;
116 inode->i_uid = current->fsuid; 116 inode->i_uid = current->fsuid;
117 inode->i_gid = current->fsgid; 117 inode->i_gid = current->fsgid;
118 inode->i_blksize = PAGE_CACHE_SIZE;
119 inode->i_blocks = 0; 118 inode->i_blocks = 0;
120 inode->i_mtime = inode->i_ctime = inode->i_atime = 119 inode->i_mtime = inode->i_ctime = inode->i_atime =
121 CURRENT_TIME; 120 CURRENT_TIME;
@@ -169,7 +168,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb, int mode,
169 /* all is ok */ 168 /* all is ok */
170 info->user = get_uid(u); 169 info->user = get_uid(u);
171 } else if (S_ISDIR(mode)) { 170 } else if (S_ISDIR(mode)) {
172 inode->i_nlink++; 171 inc_nlink(inode);
173 /* Some things misbehave if size == 0 on a directory */ 172 /* Some things misbehave if size == 0 on a directory */
174 inode->i_size = 2 * DIRENT_SIZE; 173 inode->i_size = 2 * DIRENT_SIZE;
175 inode->i_op = &mqueue_dir_inode_operations; 174 inode->i_op = &mqueue_dir_inode_operations;
@@ -308,7 +307,7 @@ static int mqueue_unlink(struct inode *dir, struct dentry *dentry)
308 307
309 dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME; 308 dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME;
310 dir->i_size -= DIRENT_SIZE; 309 dir->i_size -= DIRENT_SIZE;
311 inode->i_nlink--; 310 drop_nlink(inode);
312 dput(dentry); 311 dput(dentry);
313 return 0; 312 return 0;
314} 313}
@@ -1275,10 +1274,7 @@ out_filesystem:
1275out_sysctl: 1274out_sysctl:
1276 if (mq_sysctl_table) 1275 if (mq_sysctl_table)
1277 unregister_sysctl_table(mq_sysctl_table); 1276 unregister_sysctl_table(mq_sysctl_table);
1278 if (kmem_cache_destroy(mqueue_inode_cachep)) { 1277 kmem_cache_destroy(mqueue_inode_cachep);
1279 printk(KERN_INFO
1280 "mqueue_inode_cache: not all structures were freed\n");
1281 }
1282 return error; 1278 return error;
1283} 1279}
1284 1280