X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Flocks.c;h=0a4f50dfadfbf672ff3bc0bcba0581a3e94b83bb;hb=212a17ab878305600e607f637d2d8a49d9f7ef25;hp=0f3998291f78e4fa08b5d3c102f6d8dcc120247a;hpb=97eb3f24352ec6632c2127b35d8087d2a809a9b9;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/locks.c b/fs/locks.c index 0f3998291f78..0a4f50dfadfb 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -145,7 +145,6 @@ static DEFINE_SPINLOCK(file_lock_lock); /* * Protects the two list heads above, plus the inode->i_flock list - * FIXME: should use a spinlock, once lockd and ceph are ready. */ void lock_flocks(void) { @@ -415,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