]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/read_write.c
[SPARC64]: Kill duplicate exports of string library functions.
[karo-tx-linux.git] / fs / read_write.c
index df3468a22fea498889a5af4523556439d9f880bf..34b1bf259efd239d5380282b689258285711fc5e 100644 (file)
@@ -33,7 +33,7 @@ loff_t generic_file_llseek(struct file *file, loff_t offset, int origin)
        long long retval;
        struct inode *inode = file->f_mapping->host;
 
-       down(&inode->i_sem);
+       mutex_lock(&inode->i_mutex);
        switch (origin) {
                case 2:
                        offset += inode->i_size;
@@ -49,7 +49,7 @@ loff_t generic_file_llseek(struct file *file, loff_t offset, int origin)
                }
                retval = offset;
        }
-       up(&inode->i_sem);
+       mutex_unlock(&inode->i_mutex);
        return retval;
 }
 
@@ -470,7 +470,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
         * verify all the pointers
         */
        ret = -EINVAL;
-       if ((nr_segs > UIO_MAXIOV) || (nr_segs <= 0))
+       if (nr_segs > UIO_MAXIOV)
                goto out;
        if (!file->f_op)
                goto out;