lkml.org 
[lkml]   [2010]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 04/18] ib/qib: use generic_file_llseek
    Date
    When the default llseek action gets changed to
    no_llseek, all file systems relying on the
    current behaviour need to set explicit .llseek
    operations.

    In case of qib_fs, we want the files to be
    seekable, so generic_file_llseek fits best.

    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Cc: Roland Dreier <rolandd@cisco.com>
    Cc: Sean Hefty <sean.hefty@intel.com>
    Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
    Cc: linux-rdma@vger.kernel.org
    ---
    drivers/infiniband/hw/qib/qib_fs.c | 18 +++++++++---------
    1 files changed, 9 insertions(+), 9 deletions(-)

    diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
    index 844954b..9f989c0 100644
    --- a/drivers/infiniband/hw/qib/qib_fs.c
    +++ b/drivers/infiniband/hw/qib/qib_fs.c
    @@ -135,8 +135,8 @@ static ssize_t driver_names_read(struct file *file, char __user *buf,
    }

    static const struct file_operations driver_ops[] = {
    - { .read = driver_stats_read, },
    - { .read = driver_names_read, },
    + { .read = driver_stats_read, .llseek = generic_file_llseek, },
    + { .read = driver_names_read, .llseek = generic_file_llseek, },
    };

    /* read the per-device counters */
    @@ -164,8 +164,8 @@ static ssize_t dev_names_read(struct file *file, char __user *buf,
    }

    static const struct file_operations cntr_ops[] = {
    - { .read = dev_counters_read, },
    - { .read = dev_names_read, },
    + { .read = dev_counters_read, .llseek = generic_file_llseek, },
    + { .read = dev_names_read, .llseek = generic_file_llseek, },
    };

    /*
    @@ -210,9 +210,9 @@ static ssize_t portcntrs_2_read(struct file *file, char __user *buf,
    }

    static const struct file_operations portcntr_ops[] = {
    - { .read = portnames_read, },
    - { .read = portcntrs_1_read, },
    - { .read = portcntrs_2_read, },
    + { .read = portnames_read, .llseek = generic_file_llseek, },
    + { .read = portcntrs_1_read, .llseek = generic_file_llseek, },
    + { .read = portcntrs_2_read, .llseek = generic_file_llseek, },
    };

    /*
    @@ -261,8 +261,8 @@ static ssize_t qsfp_2_read(struct file *file, char __user *buf,
    }

    static const struct file_operations qsfp_ops[] = {
    - { .read = qsfp_1_read, },
    - { .read = qsfp_2_read, },
    + { .read = qsfp_1_read, .llseek = generic_file_llseek, },
    + { .read = qsfp_2_read, .llseek = generic_file_llseek, },
    };

    static ssize_t flash_read(struct file *file, char __user *buf,
    --
    1.7.1


    \
     
     \ /
      Last update: 2010-07-07 23:45    [W:4.567 / U:0.564 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site