diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-06-20 15:53:43 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-06-29 11:46:44 -0400 |
commit | 011e2a7fd5e9e0c2fdba6b9466d53fc437f8bfaf (patch) | |
tree | b88d11754a6ed0a4cea439dc43a39fb88a5b05a8 /fs/nfs/file.c | |
parent | a5c58892b427a2752e3ec44b0aad4ce9221dc63b (diff) |
NFS: Create a have_delegation rpc_op
Delegations are a v4 feature, so push them out of the generic code.
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 8941ac41c59b..57a22a1533e2 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -178,7 +178,7 @@ nfs_file_flush(struct file *file, fl_owner_t id) | |||
178 | * If we're holding a write delegation, then just start the i/o | 178 | * If we're holding a write delegation, then just start the i/o |
179 | * but don't wait for completion (or send a commit). | 179 | * but don't wait for completion (or send a commit). |
180 | */ | 180 | */ |
181 | if (nfs_have_delegation(inode, FMODE_WRITE)) | 181 | if (NFS_PROTO(inode)->have_delegation(inode, FMODE_WRITE)) |
182 | return filemap_fdatawrite(file->f_mapping); | 182 | return filemap_fdatawrite(file->f_mapping); |
183 | 183 | ||
184 | /* Flush writes to the server and return any errors */ | 184 | /* Flush writes to the server and return any errors */ |
@@ -677,7 +677,7 @@ do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) | |||
677 | } | 677 | } |
678 | fl->fl_type = saved_type; | 678 | fl->fl_type = saved_type; |
679 | 679 | ||
680 | if (nfs_have_delegation(inode, FMODE_READ)) | 680 | if (NFS_PROTO(inode)->have_delegation(inode, FMODE_READ)) |
681 | goto out_noconflict; | 681 | goto out_noconflict; |
682 | 682 | ||
683 | if (is_local) | 683 | if (is_local) |
@@ -772,7 +772,7 @@ do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) | |||
772 | * This makes locking act as a cache coherency point. | 772 | * This makes locking act as a cache coherency point. |
773 | */ | 773 | */ |
774 | nfs_sync_mapping(filp->f_mapping); | 774 | nfs_sync_mapping(filp->f_mapping); |
775 | if (!nfs_have_delegation(inode, FMODE_READ)) { | 775 | if (!NFS_PROTO(inode)->have_delegation(inode, FMODE_READ)) { |
776 | if (is_time_granular(&NFS_SERVER(inode)->time_delta)) | 776 | if (is_time_granular(&NFS_SERVER(inode)->time_delta)) |
777 | __nfs_revalidate_inode(NFS_SERVER(inode), inode); | 777 | __nfs_revalidate_inode(NFS_SERVER(inode), inode); |
778 | else | 778 | else |