aboutsummaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-08-10 23:40:50 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2009-08-10 23:40:50 +0200
commitdcbf77cac640af0ab944d5cbb07934bf6708b4d9 (patch)
treee2f4d1b3a1089ee10436cb19740a9cb99f2dc527 /fs/namespace.c
parentc00aafcd4977769e8728292302ddbbb8b1082fab (diff)
parent85dfd81dc57e8183a277ddd7a56aa65c96f3f487 (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 277c28a63ea..7230787d18b 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -316,7 +316,8 @@ EXPORT_SYMBOL_GPL(mnt_clone_write);
*/
int mnt_want_write_file(struct file *file)
{
- if (!(file->f_mode & FMODE_WRITE))
+ struct inode *inode = file->f_dentry->d_inode;
+ if (!(file->f_mode & FMODE_WRITE) || special_file(inode->i_mode))
return mnt_want_write(file->f_path.mnt);
else
return mnt_clone_write(file->f_path.mnt);