diff options
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index cec78c82b1f9..2a8d665b134b 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -61,12 +61,6 @@ | |||
61 | #define NFSDDBG_FACILITY NFSDDBG_FILEOP | 61 | #define NFSDDBG_FACILITY NFSDDBG_FILEOP |
62 | 62 | ||
63 | 63 | ||
64 | /* We must ignore files (but only files) which might have mandatory | ||
65 | * locks on them because there is no way to know if the accesser has | ||
66 | * the lock. | ||
67 | */ | ||
68 | #define IS_ISMNDLK(i) (S_ISREG((i)->i_mode) && MANDATORY_LOCK(i)) | ||
69 | |||
70 | /* | 64 | /* |
71 | * This is a cache of readahead params that help us choose the proper | 65 | * This is a cache of readahead params that help us choose the proper |
72 | * readahead strategy. Initially, we set all readahead parameters to 0 | 66 | * readahead strategy. Initially, we set all readahead parameters to 0 |
@@ -689,7 +683,12 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, | |||
689 | err = nfserr_perm; | 683 | err = nfserr_perm; |
690 | if (IS_APPEND(inode) && (access & MAY_WRITE)) | 684 | if (IS_APPEND(inode) && (access & MAY_WRITE)) |
691 | goto out; | 685 | goto out; |
692 | if (IS_ISMNDLK(inode)) | 686 | /* |
687 | * We must ignore files (but only files) which might have mandatory | ||
688 | * locks on them because there is no way to know if the accesser has | ||
689 | * the lock. | ||
690 | */ | ||
691 | if (S_ISREG((inode)->i_mode) && mandatory_lock(inode)) | ||
693 | goto out; | 692 | goto out; |
694 | 693 | ||
695 | if (!inode->i_fop) | 694 | if (!inode->i_fop) |