diff options
author | Anton Altaparmakov <aia21@cam.ac.uk> | 2012-02-23 18:40:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-23 18:56:21 -0500 |
commit | 37fbf4bfb826372c3ca6c09d8a015d1fe9f5e186 (patch) | |
tree | 16916e8992768f4bf91152a16cd7b66c0d282314 /fs | |
parent | bb4c7e9a9908548b458f34afb2fee74dc0d49f90 (diff) |
Restore direct_io / truncate locking API
With kernel 3.1, Christoph removed i_alloc_sem and replaced it with
calls (namely inode_dio_wait() and inode_dio_done()) which are
EXPORT_SYMBOL_GPL() thus they cannot be used by non-GPL file systems and
further inode_dio_wait() was pushed from notify_change() into the file
system ->setattr() method but no non-GPL file system can make this call.
That means non-GPL file systems cannot exist any more unless they do not
use any VFS functionality related to reading/writing as far as I can
tell or at least as long as they want to implement direct i/o.
Both Linus and Al (and others) have said on LKML that this breakage of
the VFS API should not have happened and that the change was simply
missed as it was not documented in the change logs of the patches that
did those changes.
This patch changes the two function exports in question to be
EXPORT_SYMBOL() thus restoring the VFS API as it used to be - accessible
for all modules.
Christoph, who introduced the two functions and exported them GPL-only
is CC-ed on this patch to give him the opportunity to object to the
symbols being changed in this manner if he did indeed intend them to be
GPL-only and does not want them to become available to all modules.
Signed-off-by: Anton Altaparmakov <anton@tuxera.com>
CC: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/direct-io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index 4a588dbd11bf..f4aadd15b613 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -173,7 +173,7 @@ void inode_dio_wait(struct inode *inode) | |||
173 | if (atomic_read(&inode->i_dio_count)) | 173 | if (atomic_read(&inode->i_dio_count)) |
174 | __inode_dio_wait(inode); | 174 | __inode_dio_wait(inode); |
175 | } | 175 | } |
176 | EXPORT_SYMBOL_GPL(inode_dio_wait); | 176 | EXPORT_SYMBOL(inode_dio_wait); |
177 | 177 | ||
178 | /* | 178 | /* |
179 | * inode_dio_done - signal finish of a direct I/O requests | 179 | * inode_dio_done - signal finish of a direct I/O requests |
@@ -187,7 +187,7 @@ void inode_dio_done(struct inode *inode) | |||
187 | if (atomic_dec_and_test(&inode->i_dio_count)) | 187 | if (atomic_dec_and_test(&inode->i_dio_count)) |
188 | wake_up_bit(&inode->i_state, __I_DIO_WAKEUP); | 188 | wake_up_bit(&inode->i_state, __I_DIO_WAKEUP); |
189 | } | 189 | } |
190 | EXPORT_SYMBOL_GPL(inode_dio_done); | 190 | EXPORT_SYMBOL(inode_dio_done); |
191 | 191 | ||
192 | /* | 192 | /* |
193 | * How many pages are in the queue? | 193 | * How many pages are in the queue? |