Skip to contentSkip to conversation

dm: Use nonseekable_open

PATCH New Frederic Weisbecker 1 participant 1 message Apr 10, 2010 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: Use nonseekable_open

From: Arnd Bergmann <[email protected]>

The dm control device does not implement read/write, so it has no use for seeking. Using no_llseek prevents falling back to default_llseek, which requires the BKL.

Cc Alasdair G Kergon <[email protected]>
[drop useless llseek = no_llseek]
---
 drivers/md/dm-ioctl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/md/dm-ioctl.c +1 -0
index d7500e1..78b28eb 100644
@@ -1593,6 +1593,7 @@ static long dm_compat_ctl_ioctl(struct file *file, uint command, ulong u)
 #endif
 
 static const struct file_operations _ctl_fops = {
+	.open = nonseekable_open,
 	.unlocked_ioctl	 = dm_ctl_ioctl,
 	.compat_ioctl = dm_compat_ctl_ioctl,
 	.owner	 = THIS_MODULE,
Signature · 1 line
1.6.2.3