diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-04-13 05:49:04 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-04-13 06:01:21 -0400 |
commit | 02f4865fa415a87de28cc8c2e4d798ff46be1cf8 (patch) | |
tree | 7d8e1087fd17e0390439ad4fe3cdd59477c3032c /sound/core/seq | |
parent | 73029e0ff18dfac8a1aab1dc188e1e150bbe3adc (diff) |
ALSA: core - Define llseek fops
Set no_llseek to llseek file ops of each sound component (but for hwdep).
This avoids the implicit BKL invocation via generic_file_llseek() used
as default when fops.llseek is NULL.
Also call nonseekable_open() at each open ops to ensure the file flags
have no seek bit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq')
-rw-r--r-- | sound/core/seq/seq_clientmgr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index 48eca9ff9ee7..99a485f13648 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c | |||
@@ -318,6 +318,11 @@ static int snd_seq_open(struct inode *inode, struct file *file) | |||
318 | int c, mode; /* client id */ | 318 | int c, mode; /* client id */ |
319 | struct snd_seq_client *client; | 319 | struct snd_seq_client *client; |
320 | struct snd_seq_user_client *user; | 320 | struct snd_seq_user_client *user; |
321 | int err; | ||
322 | |||
323 | err = nonseekable_open(inode, file); | ||
324 | if (err < 0) | ||
325 | return err; | ||
321 | 326 | ||
322 | if (mutex_lock_interruptible(®ister_mutex)) | 327 | if (mutex_lock_interruptible(®ister_mutex)) |
323 | return -ERESTARTSYS; | 328 | return -ERESTARTSYS; |
@@ -2550,6 +2555,7 @@ static const struct file_operations snd_seq_f_ops = | |||
2550 | .write = snd_seq_write, | 2555 | .write = snd_seq_write, |
2551 | .open = snd_seq_open, | 2556 | .open = snd_seq_open, |
2552 | .release = snd_seq_release, | 2557 | .release = snd_seq_release, |
2558 | .llseek = no_llseek, | ||
2553 | .poll = snd_seq_poll, | 2559 | .poll = snd_seq_poll, |
2554 | .unlocked_ioctl = snd_seq_ioctl, | 2560 | .unlocked_ioctl = snd_seq_ioctl, |
2555 | .compat_ioctl = snd_seq_ioctl_compat, | 2561 | .compat_ioctl = snd_seq_ioctl_compat, |