[PATCH 4.9 107/240] mtd: require write permissions for locking and badblock ioctls