From e34c133ec6053025124416a3861f9f4c4f7fd772 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Wed, 6 Feb 2013 19:13:00 +0000 Subject: Add write buffer for tar writes update fuse to 2.9.2 catch return from unlink so that we don't print error messages when things work Change-Id: I1115039a0fa5d9d73f78ef1abd79755d7ffd9d96 --- fuse/ulockmgr.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fuse/ulockmgr.c') diff --git a/fuse/ulockmgr.c b/fuse/ulockmgr.c index 4a049d5b2..f0523ae70 100644 --- a/fuse/ulockmgr.c +++ b/fuse/ulockmgr.c @@ -400,6 +400,10 @@ int ulockmgr_op(int fd, int cmd, struct flock *lock, const void *owner, if (cmd != F_GETLK && cmd != F_SETLK && cmd != F_SETLKW) return -EINVAL; + if (lock->l_type != F_RDLCK && lock->l_type != F_WRLCK && + lock->l_type != F_UNLCK) + return -EINVAL; + if (lock->l_whence != SEEK_SET && lock->l_whence != SEEK_CUR && lock->l_whence != SEEK_END) return -EINVAL; -- cgit v1.2.3