@Override
	public void lockFile(FileHandle handle, long byteOffset, long length)
			throws PathNotFoundException, AccessDeniedException,
			NotAFileException, UnsupportedFeatureException, AlreadyLockedException {

		if (hardlinks)
		{
			if (RedirectedFileHandle.class.isInstance(handle))
			{
				handle = ((RedirectedFileHandle)handle).getRedirectedFileHandle();
			}
		}
		if (fileLocking)
		{
			FileLock lock = getFileLockWithinOffset(handle.getFilePath(), byteOffset, byteOffset + length);
			if (lock != null)
				throw new AlreadyLockedException();
			
			LinkedList<FileLock> list = getFileLockList(handle.getFilePath(), true);
			list.add(new FileLock(handle, byteOffset, byteOffset + length));
		} else
			innerFs.lockFile(handle, byteOffset, length);
	}