aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2008-06-27 05:05:24 -0400
committerJonathan Corbet <corbet@lwn.net>2008-07-02 17:06:27 -0400
commit9465efc9e96135a2cec8154c0c766fa59984a298 (patch)
tree079b94123ab65ff80c4869bcf25192c8596b049c /include
parent9c20616c385ebeaa30257ef5d35e8f346db4ee32 (diff)
Remove BKL from remote_llseek v2
- Replace remote_llseek with generic_file_llseek_unlocked (to force compilation failures in all users) - Change all users to either use generic_file_llseek_unlocked directly or take the BKL around. I changed the file systems who don't use the BKL for anything (CIFS, GFS) to call it directly. NCPFS and SMBFS and NFS take the BKL, but explicitely in their own source now. I moved them all over in a single patch to avoid unbisectable sections. Open problem: 32bit kernels can corrupt fpos because its modification is not atomic, but they can do that anyways because there's other paths who modify it without BKL. Do we need a special lock for the pos/f_version = 0 checks? Trond says the NFS BKL is likely not needed, but keep it for now until his full audit. v2: Use generic_file_llseek_unlocked instead of remote_llseek_unlocked and factor duplicated code (suggested by hch) Cc: Trond.Myklebust@netapp.com Cc: swhiteho@redhat.com Cc: sfrench@samba.org Cc: vandrove@vc.cvut.cz Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f413085f748..b158e5161bc 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1871,7 +1871,8 @@ extern void
1871file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); 1871file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
1872extern loff_t no_llseek(struct file *file, loff_t offset, int origin); 1872extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
1873extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); 1873extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
1874extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); 1874extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset,
1875 int origin);
1875extern int generic_file_open(struct inode * inode, struct file * filp); 1876extern int generic_file_open(struct inode * inode, struct file * filp);
1876extern int nonseekable_open(struct inode * inode, struct file * filp); 1877extern int nonseekable_open(struct inode * inode, struct file * filp);
1877 1878