diff -urN linux-2.5.5-pre1/arch/cris/drivers/eeprom.c linux/arch/cris/drivers/eeprom.c --- linux-2.5.5-pre1/arch/cris/drivers/eeprom.c Wed Feb 13 18:18:43 2002 +++ linux/arch/cris/drivers/eeprom.c Sat Feb 16 18:11:30 2002 @@ -470,17 +470,17 @@ /* truncate position */ if (file->f_pos < 0) { - file->f_pos = 0; - unlock_kernel(); + file->f_pos = 0; ret = -EOVERFLOW; } - + if (file->f_pos >= eeprom.size) { file->f_pos = eeprom.size - 1; ret = -EOVERFLOW; } + unlock_kernel(); return ( ret ); } diff -urN linux-2.5.5-pre1/drivers/ieee1394/pcilynx.c linux/drivers/ieee1394/pcilynx.c --- linux-2.5.5-pre1/drivers/ieee1394/pcilynx.c Wed Feb 13 18:18:46 2002 +++ linux/drivers/ieee1394/pcilynx.c Sat Feb 16 17:58:47 2002 @@ -748,10 +748,11 @@ } if (newoffs < 0 || newoffs > PCILYNX_MAX_MEMORY + 1) { - lock_kernel(); + unlock_kernel(); return -EINVAL; } + unlock_kernel(); file->f_pos = newoffs; return newoffs; } diff -urN linux-2.5.5-pre1/sound/core/info.c linux/sound/core/info.c --- linux-2.5.5-pre1/sound/core/info.c Wed Feb 13 18:18:59 2002 +++ linux/sound/core/info.c Tue Feb 19 17:55:29 2002 @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef CONFIG_DEVFS_FS #include #endif @@ -160,31 +161,40 @@ { snd_info_private_data_t *data; struct snd_info_entry *entry; + int ret = -EINVAL; data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO); entry = data->entry; + lock_kernel(); switch (entry->content) { case SNDRV_INFO_CONTENT_TEXT: switch (orig) { case 0: /* SEEK_SET */ file->f_pos = offset; - return file->f_pos; + ret = file->f_pos; + goto out; case 1: /* SEEK_CUR */ file->f_pos += offset; - return file->f_pos; + ret = file->f_pos; + goto out; case 2: /* SEEK_END */ default: - return -EINVAL; + goto out; } break; case SNDRV_INFO_CONTENT_DATA: - if (entry->c.ops->llseek) - return entry->c.ops->llseek(entry, + if (entry->c.ops->llseek) { + ret = entry->c.ops->llseek(entry, data->file_private_data, file, offset, orig); + goto out; + } break; } - return -ENXIO; + ret = -ENXIO; +out: + unlock_kernel(); + return ret; } static ssize_t snd_info_entry_read(struct file *file, char *buffer, diff -urN linux-2.5.5/Documentation/filesystems/porting linux/Documentation/filesystems/porting --- linux-2.5.5/Documentation/filesystems/porting Tue Feb 19 21:10:58 2002 +++ linux/Documentation/filesystems/porting Tue Feb 19 21:53:01 2002 @@ -81,11 +81,12 @@ [mandatory] ->lookup(), ->truncate(), ->create(), ->unlink(), ->mknod(), ->mkdir(), -->rmdir(), ->link(), ->symlink() and ->rename() are called without BKL now. -Grab it on the entry, drop upon return - that will guarantee the same -locking you used to have. If your method or its parts do not need BKL - -better yet, now you can shift lock_kernel() / unlock_kernel() so that -they would protect exactly what needs to be protected. +->rmdir(), ->link(), ->lseek(), ->symlink() and ->rename() are called +without BKL now. Grab it on the entry, drop upon return - that will +guarantee the same locking you used to have. If your method or its +parts do not need BKL - better yet, now you can shift lock_kernel() and +unlock_kernel() so that they would protect exactly what needs to be +protected. --- [informational]