summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-01-25 05:59:22 +1300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-01-25 05:59:22 +1300
commit22a89a6b88e6db7328292491f564b54b13cc15fb (patch)
treea8569e5ab68c904250da73fc3d077847b8f66ce0 /fs
parentaa7b98459f15bf45d0610c8acfa7929a8641864a (diff)
parent74827ee29565f86e2a64495a5e3e58d3371d74ee (diff)
Merge tag 'ceph-for-5.0-rc4' of git://github.com/ceph/ceph-client
Pull ceph fixes from Ilya Dryomov: "A fix for a potential use-after-free, a patch to close a (mostly benign) race in the messenger and a licence clarification for quota.c" * tag 'ceph-for-5.0-rc4' of git://github.com/ceph/ceph-client: ceph: quota: cleanup license mess libceph: avoid KEEPALIVE_PENDING races in ceph_con_keepalive() ceph: clear inode pointer when snap realm gets dropped by its inode
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/caps.c2
-rw-r--r--fs/ceph/quota.c13
2 files changed, 2 insertions, 13 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 94c026bba2c2..bba28a5034ba 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1035,6 +1035,8 @@ static void drop_inode_snap_realm(struct ceph_inode_info *ci)
list_del_init(&ci->i_snap_realm_item);
ci->i_snap_realm_counter++;
ci->i_snap_realm = NULL;
+ if (realm->ino == ci->i_vino.ino)
+ realm->inode = NULL;
spin_unlock(&realm->inodes_with_caps_lock);
ceph_put_snap_realm(ceph_sb_to_client(ci->vfs_inode.i_sb)->mdsc,
realm);
diff --git a/fs/ceph/quota.c b/fs/ceph/quota.c
index 03f4d24db8fe..9455d3aef0c3 100644
--- a/fs/ceph/quota.c
+++ b/fs/ceph/quota.c
@@ -3,19 +3,6 @@
* quota.c - CephFS quota
*
* Copyright (C) 2017-2018 SUSE
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/statfs.h>