Skip to content

Commit 9888c34

Browse files
committed
btrfs: replace GPL boilerplate by SPDX -- headers
Remove GPL boilerplate text (long, short, one-line) and keep the rest, ie. personal, company or original source copyright statements. Add the SPDX header. Unify the include protection macros to match the file names. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 471d557 commit 9888c34

35 files changed

+133
-475
lines changed

fs/btrfs/async-thread.h

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2007 Oracle. All rights reserved.
34
* Copyright (C) 2014 Fujitsu. All rights reserved.
4-
*
5-
* This program is free software; you can redistribute it and/or
6-
* modify it under the terms of the GNU General Public
7-
* License v2 as published by the Free Software Foundation.
8-
*
9-
* This program is distributed in the hope that it will be useful,
10-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12-
* General Public License for more details.
13-
*
14-
* You should have received a copy of the GNU General Public
15-
* License along with this program; if not, write to the
16-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17-
* Boston, MA 021110-1307, USA.
185
*/
196

20-
#ifndef __BTRFS_ASYNC_THREAD_
21-
#define __BTRFS_ASYNC_THREAD_
7+
#ifndef BTRFS_ASYNC_THREAD_H
8+
#define BTRFS_ASYNC_THREAD_H
9+
2210
#include <linux/workqueue.h>
2311

2412
struct btrfs_fs_info;
@@ -85,4 +73,5 @@ void btrfs_set_work_high_priority(struct btrfs_work *work);
8573
struct btrfs_fs_info *btrfs_work_owner(const struct btrfs_work *work);
8674
struct btrfs_fs_info *btrfs_workqueue_owner(const struct __btrfs_workqueue *wq);
8775
bool btrfs_workqueue_normal_congested(const struct btrfs_workqueue *wq);
76+
8877
#endif

fs/btrfs/backref.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2011 STRATO. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
185

19-
#ifndef __BTRFS_BACKREF__
20-
#define __BTRFS_BACKREF__
6+
#ifndef BTRFS_BACKREF_H
7+
#define BTRFS_BACKREF_H
218

229
#include <linux/btrfs.h>
2310
#include "ulist.h"

fs/btrfs/btrfs_inode.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2007 Oracle. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
185

19-
#ifndef __BTRFS_I__
20-
#define __BTRFS_I__
6+
#ifndef BTRFS_INODE_H
7+
#define BTRFS_INODE_H
218

229
#include <linux/hash.h>
2310
#include "extent_map.h"

fs/btrfs/check-integrity.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) STRATO AG 2011. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
185

19-
#if !defined(__BTRFS_CHECK_INTEGRITY__)
20-
#define __BTRFS_CHECK_INTEGRITY__
6+
#ifndef BTRFS_CHECK_INTEGRITY_H
7+
#define BTRFS_CHECK_INTEGRITY_H
218

229
#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
2310
int btrfsic_submit_bh(int op, int op_flags, struct buffer_head *bh);

fs/btrfs/compression.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2008 Oracle. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
185

19-
#ifndef __BTRFS_COMPRESSION_
20-
#define __BTRFS_COMPRESSION_
6+
#ifndef BTRFS_COMPRESSION_H
7+
#define BTRFS_COMPRESSION_H
218

229
/*
2310
* We want to make sure that amount of RAM required to uncompress an extent is

fs/btrfs/ctree.h

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2007 Oracle. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
185

19-
#ifndef __BTRFS_CTREE__
20-
#define __BTRFS_CTREE__
6+
#ifndef BTRFS_CTREE_H
7+
#define BTRFS_CTREE_H
218

229
#include <linux/mm.h>
2310
#include <linux/sched/signal.h>
@@ -3752,4 +3739,5 @@ static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info)
37523739
#endif
37533740
return 0;
37543741
}
3742+
37553743
#endif

fs/btrfs/dedupe.h

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2016 Fujitsu. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
185

19-
#ifndef __BTRFS_DEDUPE__
20-
#define __BTRFS_DEDUPE__
6+
#ifndef BTRFS_DEDUPE_H
7+
#define BTRFS_DEDUPE_H
218

229
/* later in-band dedupe will expand this struct */
2310
struct btrfs_dedupe_hash;
11+
2412
#endif

fs/btrfs/delayed-inode.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2011 Fujitsu. All rights reserved.
34
* Written by Miao Xie <miaox@cn.fujitsu.com>
4-
*
5-
* This program is free software; you can redistribute it and/or
6-
* modify it under the terms of the GNU General Public
7-
* License v2 as published by the Free Software Foundation.
8-
*
9-
* This program is distributed in the hope that it will be useful,
10-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12-
* General Public License for more details.
13-
*
14-
* You should have received a copy of the GNU General Public
15-
* License along with this program; if not, write to the
16-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17-
* Boston, MA 021110-1307, USA.
185
*/
196

20-
#ifndef __DELAYED_TREE_OPERATION_H
21-
#define __DELAYED_TREE_OPERATION_H
7+
#ifndef BTRFS_DELAYED_INODE_H
8+
#define BTRFS_DELAYED_INODE_H
229

2310
#include <linux/rbtree.h>
2411
#include <linux/spinlock.h>

fs/btrfs/delayed-ref.h

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2008 Oracle. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
18-
#ifndef __DELAYED_REF__
19-
#define __DELAYED_REF__
5+
6+
#ifndef BTRFS_DELAYED_REF_H
7+
#define BTRFS_DELAYED_REF_H
208

219
#include <linux/refcount.h>
2210

@@ -298,4 +286,5 @@ btrfs_delayed_node_to_data_ref(struct btrfs_delayed_ref_node *node)
298286
{
299287
return container_of(node, struct btrfs_delayed_data_ref, node);
300288
}
289+
301290
#endif

fs/btrfs/dev-replace.h

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) STRATO AG 2012. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
185

19-
#if !defined(__BTRFS_DEV_REPLACE__)
20-
#define __BTRFS_DEV_REPLACE__
6+
#ifndef BTRFS_DEV_REPLACE_H
7+
#define BTRFS_DEV_REPLACE_H
218

229
struct btrfs_ioctl_dev_replace_args;
2310

@@ -48,4 +35,5 @@ static inline void btrfs_dev_replace_stats_inc(atomic64_t *stat_value)
4835
{
4936
atomic64_inc(stat_value);
5037
}
38+
5139
#endif

fs/btrfs/disk-io.h

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2007 Oracle. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
185

19-
#ifndef __DISKIO__
20-
#define __DISKIO__
6+
#ifndef BTRFS_DISK_IO_H
7+
#define BTRFS_DISK_IO_H
218

229
#define BTRFS_SUPER_INFO_OFFSET SZ_64K
2310
#define BTRFS_SUPER_INFO_SIZE 4096
@@ -169,4 +156,5 @@ static inline void btrfs_set_buffer_lockdep_class(u64 objectid,
169156
{
170157
}
171158
#endif
159+
172160
#endif

fs/btrfs/export.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
23
#ifndef BTRFS_EXPORT_H
34
#define BTRFS_EXPORT_H
45

fs/btrfs/extent_io.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2-
#ifndef __EXTENTIO__
3-
#define __EXTENTIO__
2+
3+
#ifndef BTRFS_EXTENT_IO_H
4+
#define BTRFS_EXTENT_IO_H
45

56
#include <linux/rbtree.h>
67
#include <linux/refcount.h>
@@ -572,4 +573,5 @@ noinline u64 find_lock_delalloc_range(struct inode *inode,
572573
#endif
573574
struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
574575
u64 start);
576+
575577
#endif

fs/btrfs/extent_map.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2-
#ifndef __EXTENTMAP__
3-
#define __EXTENTMAP__
2+
3+
#ifndef BTRFS_EXTENT_MAP_H
4+
#define BTRFS_EXTENT_MAP_H
45

56
#include <linux/rbtree.h>
67
#include <linux/refcount.h>
@@ -93,4 +94,5 @@ struct extent_map *search_extent_mapping(struct extent_map_tree *tree,
9394
u64 start, u64 len);
9495
int btrfs_add_extent_mapping(struct extent_map_tree *em_tree,
9596
struct extent_map **em_in, u64 start, u64 len);
97+
9698
#endif

fs/btrfs/free-space-cache.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* Copyright (C) 2009 Oracle. All rights reserved.
3-
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU General Public
6-
* License v2 as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11-
* General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU General Public
14-
* License along with this program; if not, write to the
15-
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16-
* Boston, MA 021110-1307, USA.
174
*/
185

19-
#ifndef __BTRFS_FREE_SPACE_CACHE
20-
#define __BTRFS_FREE_SPACE_CACHE
6+
#ifndef BTRFS_FREE_SPACE_CACHE_H
7+
#define BTRFS_FREE_SPACE_CACHE_H
218

229
struct btrfs_free_space {
2310
struct rb_node offset_index;

0 commit comments

Comments
 (0)