summaryrefslogtreecommitdiffstats
path: root/fs/read_write.h
blob: d07b954c6e0c39afc06f99b40eb5bbcb2f0cc60b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
 * This file is only for sharing some helpers from read_write.c with compat.c.
 * Don't use anywhere else.
 */


typedef ssize_t (*io_fn_t)(struct file *, char __user *, size_t, loff_t *);
typedef ssize_t (*iov_fn_t)(struct kiocb *, const struct iovec *,
		unsigned long, loff_t);

ssize_t do_sync_readv_writev(struct file *filp, const struct iovec *iov,
		unsigned long nr_segs, size_t len, loff_t *ppos, iov_fn_t fn);
ssize_t do_loop_readv_writev(struct file *filp, struct iovec *iov,
		unsigned long nr_segs, loff_t *ppos, io_fn_t fn);
g5.osdl.org>2006-04-11 06:18:52 -0700 commitcd15654963cf7e4dd938a403de3ec5bcd09f8350 (patch) treea7bc0135754b42d3e1bb49bb685a6fea2547c12e /fs/nfsd parentb5872b0dcc0501035d5ae53c60f8cbbb3798da8a (diff)
[PATCH] knfsd: nfsd: oops exporting nonexistent directory
Export a directory that does not exist: exportfs -orw,fsid=0,insecure,no_subtree_check client:/home/NFS4 Try to mount from client with nfs4. Mount hangs (I'm not sure why - that's another issue). While client is hung, back on server mkdir /home/NFS4 The server panics in dput. I traced the problem back to svc_export_parse() calling path_release() even though path_lookup() failed (it happens to fill in the nameidata structure with a negative dentry - so the test after out: succeeds). After patching, an recreating the problem, the client mount still takes some time before finally exiting with a message "couldn't read superblock". Here is a simple patch to resolve this issue: Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/export.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c