diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-12-09 12:17:25 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-12-09 12:17:25 -0500 |
commit | d834a9dcecae834cd6b2bc5e50e1907738d9cf6a (patch) | |
tree | 0589d753465d3fe359ba451ba6cb7798df03aaa2 /ipc/mqueue.c | |
parent | a38c5380ef9f088be9f49b6e4c5d80af8b1b5cd4 (diff) | |
parent | f658bcfb2607bf0808966a69cf74135ce98e5c2d (diff) |
Merge branch 'x86/amd-nb' into x86/apic-cleanups
Reason: apic cleanup series depends on x86/apic, x86/amd-nb x86/platform
Conflicts:
arch/x86/include/asm/io_apic.h
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r-- | ipc/mqueue.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index c60e519e2917..035f4399edbc 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -116,6 +116,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb, | |||
116 | 116 | ||
117 | inode = new_inode(sb); | 117 | inode = new_inode(sb); |
118 | if (inode) { | 118 | if (inode) { |
119 | inode->i_ino = get_next_ino(); | ||
119 | inode->i_mode = mode; | 120 | inode->i_mode = mode; |
120 | inode->i_uid = current_fsuid(); | 121 | inode->i_uid = current_fsuid(); |
121 | inode->i_gid = current_fsgid(); | 122 | inode->i_gid = current_fsgid(); |
@@ -210,13 +211,13 @@ out: | |||
210 | return error; | 211 | return error; |
211 | } | 212 | } |
212 | 213 | ||
213 | static int mqueue_get_sb(struct file_system_type *fs_type, | 214 | static struct dentry *mqueue_mount(struct file_system_type *fs_type, |
214 | int flags, const char *dev_name, | 215 | int flags, const char *dev_name, |
215 | void *data, struct vfsmount *mnt) | 216 | void *data) |
216 | { | 217 | { |
217 | if (!(flags & MS_KERNMOUNT)) | 218 | if (!(flags & MS_KERNMOUNT)) |
218 | data = current->nsproxy->ipc_ns; | 219 | data = current->nsproxy->ipc_ns; |
219 | return get_sb_ns(fs_type, flags, data, mqueue_fill_super, mnt); | 220 | return mount_ns(fs_type, flags, data, mqueue_fill_super); |
220 | } | 221 | } |
221 | 222 | ||
222 | static void init_once(void *foo) | 223 | static void init_once(void *foo) |
@@ -769,7 +770,7 @@ SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name) | |||
769 | 770 | ||
770 | inode = dentry->d_inode; | 771 | inode = dentry->d_inode; |
771 | if (inode) | 772 | if (inode) |
772 | atomic_inc(&inode->i_count); | 773 | ihold(inode); |
773 | err = mnt_want_write(ipc_ns->mq_mnt); | 774 | err = mnt_want_write(ipc_ns->mq_mnt); |
774 | if (err) | 775 | if (err) |
775 | goto out_err; | 776 | goto out_err; |
@@ -1219,6 +1220,7 @@ static const struct file_operations mqueue_file_operations = { | |||
1219 | .flush = mqueue_flush_file, | 1220 | .flush = mqueue_flush_file, |
1220 | .poll = mqueue_poll_file, | 1221 | .poll = mqueue_poll_file, |
1221 | .read = mqueue_read_file, | 1222 | .read = mqueue_read_file, |
1223 | .llseek = default_llseek, | ||
1222 | }; | 1224 | }; |
1223 | 1225 | ||
1224 | static const struct super_operations mqueue_super_ops = { | 1226 | static const struct super_operations mqueue_super_ops = { |
@@ -1230,7 +1232,7 @@ static const struct super_operations mqueue_super_ops = { | |||
1230 | 1232 | ||
1231 | static struct file_system_type mqueue_fs_type = { | 1233 | static struct file_system_type mqueue_fs_type = { |
1232 | .name = "mqueue", | 1234 | .name = "mqueue", |
1233 | .get_sb = mqueue_get_sb, | 1235 | .mount = mqueue_mount, |
1234 | .kill_sb = kill_litter_super, | 1236 | .kill_sb = kill_litter_super, |
1235 | }; | 1237 | }; |
1236 | 1238 | ||