[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>

authored by

Krzysztof Benedyczak and committed by
Linus Torvalds
59175839 5c1f4cac

+1
+1
ipc/mqueue.c
··· 611 dentry->d_fsdata = &attr; 612 } 613 614 ret = vfs_create(dir->d_inode, dentry, mode, NULL); 615 dentry->d_fsdata = NULL; 616 if (ret)
··· 611 dentry->d_fsdata = &attr; 612 } 613 614 + mode &= ~current->fs->umask; 615 ret = vfs_create(dir->d_inode, dentry, mode, NULL); 616 dentry->d_fsdata = NULL; 617 if (ret)