[PATCH] Make POSIX message queue sys_mq_open() honor umask

We ignored umask when creating new queues via mq_open (when creating
with open() on mqueue fs it is ok of course).  According to the
specification this a bug.  This trivial patch fixes this.

Signed-off-by: Krzysztof Benedyczak <golbi@mat.uni.torun.pl>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 3a92601..a0f18c9 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -611,6 +611,7 @@
 		dentry->d_fsdata = &attr;
 	}
 
+	mode &= ~current->fs->umask;
 	ret = vfs_create(dir->d_inode, dentry, mode, NULL);
 	dentry->d_fsdata = NULL;
 	if (ret)