lkml.org 
[lkml]   [2009]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] macintosh: Explicitly set llseek to no_llseek in ans-lcd


    On Wed, 21 Oct 2009, Frederic Weisbecker wrote:

    > On Wed, Oct 21, 2009 at 11:07:18PM +0200, John Kacur wrote:
    > > From 0c2b412cdccf73bdeb19bb866bfe556942eaeca2 Mon Sep 17 00:00:00 2001
    > > From: John Kacur <jkacur@redhat.com>
    > > Date: Wed, 21 Oct 2009 23:01:12 +0200
    > > Subject: [PATCH] macintosh: Explicitly set llseek to no_llseek in ans-lcd
    > >
    > > Now that we've removed the BKL here, let's explicitly set lleek to no_llseek
    > >
    > > Signed-off-by: John Kacur <jkacur@redhat.com>
    > > ---
    > > drivers/macintosh/ans-lcd.c | 1 +
    > > 1 files changed, 1 insertions(+), 0 deletions(-)
    > >
    > > diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
    > > index 4ae8ec9..a1a1bde 100644
    > > --- a/drivers/macintosh/ans-lcd.c
    > > +++ b/drivers/macintosh/ans-lcd.c
    > > @@ -137,6 +137,7 @@ const struct file_operations anslcd_fops = {
    > > .write = anslcd_write,
    > > .unlocked_ioctl = anslcd_ioctl,
    > > .open = anslcd_open,
    > > + .llseedk = no_llseek,
    >
    >
    > llseedk? :)
    >
    >
    > Should we better pushdown default_llseek to every to every
    > file operations that don't implement llseek?
    > I don't know how many of them don't implement llseek() though.
    >
    > That said we can't continue anymore with this default attribution
    > of default_llseek() on new fops.
    >

    If you don't explicitly set it to no_llseek, you automatically get the
    default_llseek, which uses the BKL. So if your driver doesn't need it, it
    is best to explicitly set it to no_llseek.

    There is also a generic_file_llseek_unlocked, somewhat analogous to the
    unlocked_ioctls that you can use if you don't need to provide a full
    llseek yourself.


    \
     
     \ /
      Last update: 2009-10-21 23:37    [W:0.022 / U:4.448 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site