Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / client / Fh.cc
1
2 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
3 // vim: ts=8 sw=2 smarttab
4 /*
5  * Ceph - scalable distributed file system
6  *
7  * Copyright (C) 2017 Red Hat Inc
8  *
9  * This is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License version 2.1, as published by the Free Software
12  * Foundation.  See file COPYING.
13  *
14  */
15
16
17 #include "Inode.h"
18
19 #include "Fh.h"
20
21 Fh::Fh(Inode *in) : inode(in), _ref(1), pos(0), mds(0), mode(0), flags(0),
22                 pos_locked(false), actor_perms(), readahead(),
23                 fcntl_locks(NULL), flock_locks(NULL)
24 {
25   inode->add_fh(this);
26 }
27
28 Fh::~Fh()
29 {
30   inode->rm_fh(this);
31 }
32