aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-11-04 13:31:21 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-26 09:09:59 -0800
commit124e35242a58c479cea2a3d6d2b2605737e27309 (patch)
tree2b487f31afc0cb7b296ecc121ceaa6a6c742ecdf /include/linux/nfs_xdr.h
parentecaaa92488e2589cc6b0a409ce44e7e47a3bb846 (diff)
downloadkernel_samsung_smdk4412-124e35242a58c479cea2a3d6d2b2605737e27309.zip
kernel_samsung_smdk4412-124e35242a58c479cea2a3d6d2b2605737e27309.tar.gz
kernel_samsung_smdk4412-124e35242a58c479cea2a3d6d2b2605737e27309.tar.bz2
nfs: when attempting to open a directory, fall back on normal lookup (try #5)
commit 1788ea6e3b2a58cf4fb00206e362d9caff8d86a7 upstream. commit d953126 changed how nfs_atomic_lookup handles an -EISDIR return from an OPEN call. Prior to that patch, that caused the client to fall back to doing a normal lookup. When that patch went in, the code began returning that error to userspace. The d_revalidate codepath however never had the corresponding change, so it was still possible to end up with a NULL ctx->state pointer after that. That patch caused a regression. When we attempt to open a directory that does not have a cached dentry, that open now errors out with EISDIR. If you attempt the same open with a cached dentry, it will succeed. Fix this by reverting the change in nfs_atomic_lookup and allowing attempts to open directories to fall back to a normal lookup Also, add a NFSv4-specific f_ops->open routine that just returns -ENOTDIR. This should never be called if things are working properly, but if it ever is, then the dprintk may help in debugging. To facilitate this, a new file_operations field is also added to the nfs_rpc_ops struct. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r--include/linux/nfs_xdr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index be2eba7..0012fc3 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1149,6 +1149,7 @@ struct nfs_rpc_ops {
const struct dentry_operations *dentry_ops;
const struct inode_operations *dir_inode_ops;
const struct inode_operations *file_inode_ops;
+ const struct file_operations *file_ops;
int (*getroot) (struct nfs_server *, struct nfs_fh *,
struct nfs_fsinfo *);