mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek
This converts everybody to handle SEEK_HOLE/SEEK_DATA properly. In some cases we just return -EINVAL, in others we do the normal generic thing, and in others we're simply making sure that the properly due-dilligence is done. For example in NFS/CIFS we need to make sure the file size is update properly for the SEEK_HOLE and SEEK_DATA case, but since it calls the generic llseek stuff itself that is all we have to do. Thanks, Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
c334b1138b
commit
06222e491e
7 changed files with 66 additions and 12 deletions
|
|
@ -29,6 +29,10 @@ static loff_t hpfs_dir_lseek(struct file *filp, loff_t off, int whence)
|
|||
struct hpfs_inode_info *hpfs_inode = hpfs_i(i);
|
||||
struct super_block *s = i->i_sb;
|
||||
|
||||
/* Somebody else will have to figure out what to do here */
|
||||
if (whence == SEEK_DATA || whence == SEEK_HOLE)
|
||||
return -EINVAL;
|
||||
|
||||
hpfs_lock(s);
|
||||
|
||||
/*printk("dir lseek\n");*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue