X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=fs%2Fdebugfs%2Ffile.c;h=950c63fa4d0b26d24e26d754101c4cbd485ad102;hb=358fcf5ddbec4e6706405847d6a666f5933a6c25;hp=7d162b0efbf03432569804ec8ceb20da31e6f9e1;hpb=be2d24336f8876d60d8a4634f1a1e4753c4be124;p=linux-2.6-microblaze.git diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index 7d162b0efbf0..950c63fa4d0b 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c @@ -147,7 +147,7 @@ static int debugfs_locked_down(struct inode *inode, struct file *filp, const struct file_operations *real_fops) { - if ((inode->i_mode & 07777) == 0444 && + if ((inode->i_mode & 07777 & ~0444) == 0 && !(filp->f_mode & FMODE_WRITE) && !real_fops->unlocked_ioctl && !real_fops->compat_ioctl &&