diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-03-15 16:44:28 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-03-25 12:04:11 -0400 |
commit | 49f9a0fafd844c32f2abada047c0b9a5ba0d6255 (patch) | |
tree | 6d9e04bc2b73c16dfefa58362cfa3d5e200cddb2 /fs/nfs/dir.c | |
parent | d9fc6619ca98943d56d2931ce9e4caa4039fd0f1 (diff) | |
download | linux-49f9a0fafd844c32f2abada047c0b9a5ba0d6255.tar.bz2 |
NFSv4.1: Enable open-by-filehandle
Sometimes, we actually _want_ to do open-by-filehandle, for instance
when recovering opens after a network partition, or when called
from nfs4_file_open.
Enable that functionality using a new capability NFS_CAP_ATOMIC_OPEN_V1,
and which is only enabled for NFSv4.1 servers that support it.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index f23f455be42b..e093e73178b7 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1486,6 +1486,8 @@ static int nfs4_lookup_revalidate(struct dentry *dentry, unsigned int flags) goto no_open; if (d_mountpoint(dentry)) goto no_open; + if (NFS_SB(dentry->d_sb)->caps & NFS_CAP_ATOMIC_OPEN_V1) + goto no_open; inode = dentry->d_inode; parent = dget_parent(dentry); |