Re: [PATCH 1/2 v2] fs: add SEEK_HOLE and SEEK_DATA flags

From: Marco Stornelli
Date: Thu May 05 2011 - 15:00:15 EST


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?

Marco
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/