On 05/05/2011 02:54 PM, Marco Stornelli wrote:
Il 04/05/2011 19:58, Josef Bacik ha scritto:
+ if (offset>= i_size_read(inode)) {
+ mutex_unlock(&inode->i_mutex);
+ return -ENXIO;
+ }
+ offset = i_size_read(inode);
+ break;

Here maybe it's possible to use offset bigger than i_size, because
i_size_read is "atomic" but something can happen between two calls,
isn't it?


We're holding the i_mutex so we are safe, i_size_read is used just for consistency sake. Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to