diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 08:20:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 08:20:39 -0700 |
commit | dc87c55120b0a5b0c4d731183f8bb348981aba65 (patch) | |
tree | c5a4f94ed6cc1678072c125f2cae08f04ce4f2b8 /fs/locks.c | |
parent | 5818fcc8bd1b27af4d40b8357b91a56cc3fae6a4 (diff) | |
parent | 4be34b9d69c97211ff4eb00d79078f3c1593804d (diff) |
Merge branch 'for-2.6.39' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.39' of git://linux-nfs.org/~bfields/linux:
SUNRPC: Remove resource leak in svc_rdma_send_error()
nfsd: wrong index used in inner loop
nfsd4: fix comment and remove unused nfsd4_file fields
nfs41: make sure nfs server return right ca_maxresponsesize_cached
nfsd: fix compile error
svcrpc: fix bad argument in unix_domain_find
nfsd4: fix struct file leak
nfsd4: minor nfs4state.c reshuffling
svcrpc: fix rare race on unix_domain creation
nfsd41: modify the members value of nfsd4_op_flags
nfsd: add proc file listing kernel's gss_krb5 enctypes
gss:krb5 only include enctype numbers in gm_upcall_enctypes
NFSD, VFS: Remove dead code in nfsd_rename()
nfsd: kill unused macro definition
locks: use assign_type()
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/locks.c b/fs/locks.c index 822c3d1843a..0a4f50dfadf 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -414,17 +414,7 @@ static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl, fl->fl_ops = NULL; fl->fl_lmops = NULL; - switch (l->l_type) { - case F_RDLCK: - case F_WRLCK: - case F_UNLCK: - fl->fl_type = l->l_type; - break; - default: - return -EINVAL; - } - - return (0); + return assign_type(fl, l->l_type); } #endif |