aboutsummaryrefslogtreecommitdiffstats
path: root/features/revoke/revoke-support-for-nfs.patch
blob: 5221a2c0804307531d0de681e133be951bcadf11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 51e8408fe903f737bc04fa97ea60f60f4570cf23 Mon Sep 17 00:00:00 2001
From: Yongli He <yongli.he@windriver.com>
Date: Fri, 8 Aug 2008 14:42:33 +0800
Subject: [PATCH 10/12] revoke support for nfs

Add support for revoke on NFS filesystems by adding the revoke
field to fileops.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Integrated-by: Yongli he   <yongli.he@windriver.com>
---
 fs/nfs/file.c |    1 +
 fs/revoke.c   |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 8d965bd..ad70519 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -78,6 +78,7 @@ const struct file_operations nfs_file_operations = {
 	.splice_write	= nfs_file_splice_write,
 	.check_flags	= nfs_check_flags,
 	.setlease	= nfs_setlease,
+	.revoke         = generic_file_revoke,
 };
 
 const struct inode_operations nfs_file_inode_operations = {
diff --git a/fs/revoke.c b/fs/revoke.c
index ac666d2..3e3bdea 100644
--- a/fs/revoke.c
+++ b/fs/revoke.c
@@ -396,7 +396,7 @@ static int do_revoke(struct inode *inode)
 	if (current->cred->fsuid != inode->i_uid && !capable(CAP_FOWNER))
 		return -EPERM;
 
-	if (!inode->i_sb->s_bdev || !inode->i_fop->revoke)
+	if (!inode->i_fop->revoke)
 		return -EOPNOTSUPP;
 
 	/*
-- 
1.6.5.2