]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/ext4/dir.c
ext4: fix a warning from sparse check for ext4_dir_llseek
[karo-tx-linux.git] / fs / ext4 / dir.c
index b8d877f6c1fa52991cb16d8bf76652e41e9dd72c..b8eeaf15b034ddff48f3a1b694a04dd780c217e8 100644 (file)
@@ -185,6 +185,7 @@ static int ext4_readdir(struct file *filp,
                                        "at offset %llu",
                                        (unsigned long long)filp->f_pos);
                        filp->f_pos += sb->s_blocksize - offset;
+                       brelse(bh);
                        continue;
                }
                set_buffer_verified(bh);
@@ -333,17 +334,17 @@ static inline loff_t ext4_get_htree_eof(struct file *filp)
  *
  * For non-htree, ext4_llseek already chooses the proper max offset.
  */
-loff_t ext4_dir_llseek(struct file *file, loff_t offset, int origin)
+static loff_t ext4_dir_llseek(struct file *file, loff_t offset, int whence)
 {
        struct inode *inode = file->f_mapping->host;
        int dx_dir = is_dx_dir(inode);
        loff_t htree_max = ext4_get_htree_eof(file);
 
        if (likely(dx_dir))
-               return generic_file_llseek_size(file, offset, origin,
+               return generic_file_llseek_size(file, offset, whence,
                                                    htree_max, htree_max);
        else
-               return ext4_llseek(file, offset, origin);
+               return ext4_llseek(file, offset, whence);
 }
 
 /*