Sorry maybe I'm a bit late? :)

Il 28/06/2011 17:33, Josef Bacik ha scritto:

  loff_t default_llseek(struct file *file, loff_t offset, int origin)
  {
+       struct inode *inode = file->f_path.dentry->d_inode;
        loff_t retval;

-       mutex_lock(&file->f_dentry->d_inode->i_mutex);
+       mutex_lock(&inode->i_mutex);
        switch (origin) {
                case SEEK_END:
-                       offset += i_size_read(file->f_path.dentry->d_inode);
+                       offset += i_size_read(inode);

Here we are under mutex, so I think we can use directly i_size without i_size_read.

Marco
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to