diff options
-rw-r--r-- | ipc/mqueue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index e5c4f609f22c..3953fda2e8bd 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -840,7 +840,8 @@ out_putfd: | |||
840 | fd = error; | 840 | fd = error; |
841 | } | 841 | } |
842 | mutex_unlock(&root->d_inode->i_mutex); | 842 | mutex_unlock(&root->d_inode->i_mutex); |
843 | mnt_drop_write(mnt); | 843 | if (!ro) |
844 | mnt_drop_write(mnt); | ||
844 | out_putname: | 845 | out_putname: |
845 | putname(name); | 846 | putname(name); |
846 | return fd; | 847 | return fd; |