X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=drivers%2Fs390%2Fchar%2Fvmur.c;h=6c30e93ab8fa2533b3f3ccd942e3a1884cf39939;hb=6108209c4ae964836f6bac5210f1c64153800b62;hp=0efb27f6f1999f4c85af4587c491b926fc30b251;hpb=da89486f03ec5996d87b62d1a26c19e9c5cddf12;p=deliverable%2Flinux.git diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index 0efb27f6f199..6c30e93ab8fa 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c @@ -782,24 +782,11 @@ static int ur_release(struct inode *inode, struct file *file) static loff_t ur_llseek(struct file *file, loff_t offset, int whence) { - loff_t newpos; - if ((file->f_flags & O_ACCMODE) != O_RDONLY) return -ESPIPE; /* seek allowed only for reader */ if (offset % PAGE_SIZE) return -ESPIPE; /* only multiples of 4K allowed */ - switch (whence) { - case 0: /* SEEK_SET */ - newpos = offset; - break; - case 1: /* SEEK_CUR */ - newpos = file->f_pos + offset; - break; - default: - return -EINVAL; - } - file->f_pos = newpos; - return newpos; + return no_seek_end_llseek(file, offset, whence); } static const struct file_operations ur_fops = {