This reverts commit
c2c9fa5c6bb4ae5a7cbb5fb51b42ca5ce4d4d832.
Can't do it this way because we need to care about file handle permissions
at driver level and we deliberately don't pass all the handles down
if (request != BLKFLSBUF)
return -1;
- if (!(getperm(ino) & OTH_WR)) {
- udata.u_error = EPERM;
- return -1;
- }
-
/* we trust that blkdev_open() has already verified that this minor number is valid */
blk_op.blkdev = &blkdev_table[minor >> 4];
if ((request & IOCTL_SUPER) && esuper())
return -1;
+ if (!(getperm(ino) & OTH_WR)) {
+ udata.u_error = EPERM;
+ return -1;
+ }
dev = ino->c_node.i_addr[0];