Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-4.17-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull more btrfs updates from David Sterba:
"We have queued a few more fixes (error handling, log replay,
softlockup) and the rest is SPDX updates that touche almost all files
so the diffstat is long"

* tag 'for-4.17-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
btrfs: Only check first key for committed tree blocks
btrfs: add SPDX header to Kconfig
btrfs: replace GPL boilerplate by SPDX -- sources
btrfs: replace GPL boilerplate by SPDX -- headers
Btrfs: fix loss of prealloc extents past i_size after fsync log replay
Btrfs: clean up resources during umount after trans is aborted
btrfs: Fix possible softlock on single core machines
Btrfs: bail out on error during replay_dir_deletes
Btrfs: fix NULL pointer dereference in log_dir_items

+277 -1234
+2
fs/btrfs/Kconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 1 3 config BTRFS_FS 2 4 tristate "Btrfs filesystem support" 3 5 select LIBCRC32C
+1 -14
fs/btrfs/acl.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2007 Red Hat. 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. 17 4 */ 18 5 19 6 #include <linux/fs.h>
+1 -14
fs/btrfs/async-thread.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2007 Oracle. All rights reserved. 3 4 * 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. 18 5 */ 19 6 20 7 #include <linux/kthread.h>
+5 -16
fs/btrfs/async-thread.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2007 Oracle. All rights reserved. 3 4 * 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. 18 5 */ 19 6 20 - #ifndef __BTRFS_ASYNC_THREAD_ 21 - #define __BTRFS_ASYNC_THREAD_ 7 + #ifndef BTRFS_ASYNC_THREAD_H 8 + #define BTRFS_ASYNC_THREAD_H 9 + 22 10 #include <linux/workqueue.h> 23 11 24 12 struct btrfs_fs_info; ··· 73 85 struct btrfs_fs_info *btrfs_work_owner(const struct btrfs_work *work); 74 86 struct btrfs_fs_info *btrfs_workqueue_owner(const struct __btrfs_workqueue *wq); 75 87 bool btrfs_workqueue_normal_congested(const struct btrfs_workqueue *wq); 88 + 76 89 #endif
+1 -14
fs/btrfs/backref.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/mm.h>
+3 -16
fs/btrfs/backref.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_BACKREF__ 20 - #define __BTRFS_BACKREF__ 6 + #ifndef BTRFS_BACKREF_H 7 + #define BTRFS_BACKREF_H 21 8 22 9 #include <linux/btrfs.h> 23 10 #include "ulist.h"
+3 -16
fs/btrfs/btrfs_inode.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_I__ 20 - #define __BTRFS_I__ 6 + #ifndef BTRFS_INODE_H 7 + #define BTRFS_INODE_H 21 8 22 9 #include <linux/hash.h> 23 10 #include "extent_map.h"
+1 -14
fs/btrfs/check-integrity.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 /*
+3 -16
fs/btrfs/check-integrity.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #if !defined(__BTRFS_CHECK_INTEGRITY__) 20 - #define __BTRFS_CHECK_INTEGRITY__ 6 + #ifndef BTRFS_CHECK_INTEGRITY_H 7 + #define BTRFS_CHECK_INTEGRITY_H 21 8 22 9 #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY 23 10 int btrfsic_submit_bh(int op, int op_flags, struct buffer_head *bh);
+1 -14
fs/btrfs/compression.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/kernel.h>
+3 -16
fs/btrfs/compression.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_COMPRESSION_ 20 - #define __BTRFS_COMPRESSION_ 6 + #ifndef BTRFS_COMPRESSION_H 7 + #define BTRFS_COMPRESSION_H 21 8 22 9 /* 23 10 * We want to make sure that amount of RAM required to uncompress an extent is
+1 -14
fs/btrfs/ctree.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2007,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. 17 4 */ 18 5 19 6 #include <linux/sched.h>
+4 -16
fs/btrfs/ctree.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_CTREE__ 20 - #define __BTRFS_CTREE__ 6 + #ifndef BTRFS_CTREE_H 7 + #define BTRFS_CTREE_H 21 8 22 9 #include <linux/mm.h> 23 10 #include <linux/sched/signal.h> ··· 3739 3752 #endif 3740 3753 return 0; 3741 3754 } 3755 + 3742 3756 #endif
+4 -16
fs/btrfs/dedupe.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_DEDUPE__ 20 - #define __BTRFS_DEDUPE__ 6 + #ifndef BTRFS_DEDUPE_H 7 + #define BTRFS_DEDUPE_H 21 8 22 9 /* later in-band dedupe will expand this struct */ 23 10 struct btrfs_dedupe_hash; 11 + 24 12 #endif
+1 -14
fs/btrfs/delayed-inode.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2011 Fujitsu. All rights reserved. 3 4 * 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. 18 5 */ 19 6 20 7 #include <linux/slab.h>
+3 -16
fs/btrfs/delayed-inode.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2011 Fujitsu. All rights reserved. 3 4 * 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. 18 5 */ 19 6 20 - #ifndef __DELAYED_TREE_OPERATION_H 21 - #define __DELAYED_TREE_OPERATION_H 7 + #ifndef BTRFS_DELAYED_INODE_H 8 + #define BTRFS_DELAYED_INODE_H 22 9 23 10 #include <linux/rbtree.h> 24 11 #include <linux/spinlock.h>
+1 -14
fs/btrfs/delayed-ref.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/sched.h>
+5 -16
fs/btrfs/delayed-ref.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 - #ifndef __DELAYED_REF__ 19 - #define __DELAYED_REF__ 5 + 6 + #ifndef BTRFS_DELAYED_REF_H 7 + #define BTRFS_DELAYED_REF_H 20 8 21 9 #include <linux/refcount.h> 22 10 ··· 286 298 { 287 299 return container_of(node, struct btrfs_delayed_data_ref, node); 288 300 } 301 + 289 302 #endif
+2 -14
fs/btrfs/dev-replace.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 5 + 18 6 #include <linux/sched.h> 19 7 #include <linux/bio.h> 20 8 #include <linux/slab.h>
+4 -16
fs/btrfs/dev-replace.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #if !defined(__BTRFS_DEV_REPLACE__) 20 - #define __BTRFS_DEV_REPLACE__ 6 + #ifndef BTRFS_DEV_REPLACE_H 7 + #define BTRFS_DEV_REPLACE_H 21 8 22 9 struct btrfs_ioctl_dev_replace_args; 23 10 ··· 35 48 { 36 49 atomic64_inc(stat_value); 37 50 } 51 + 38 52 #endif
+1 -14
fs/btrfs/dir-item.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include "ctree.h"
+11 -15
fs/btrfs/disk-io.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/fs.h> ··· 436 449 if (!first_key) 437 450 return 0; 438 451 452 + /* 453 + * For live tree block (new tree blocks in current transaction), 454 + * we need proper lock context to avoid race, which is impossible here. 455 + * So we only checks tree blocks which is read from disk, whose 456 + * generation <= fs_info->last_trans_committed. 457 + */ 458 + if (btrfs_header_generation(eb) > fs_info->last_trans_committed) 459 + return 0; 439 460 if (found_level) 440 461 btrfs_node_key_to_cpu(eb, &found_key, 0); 441 462 else ··· 3807 3812 btrfs_err(fs_info, "commit super ret %d", ret); 3808 3813 } 3809 3814 3810 - if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) 3815 + if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state) || 3816 + test_bit(BTRFS_FS_STATE_TRANS_ABORTED, &fs_info->fs_state)) 3811 3817 btrfs_error_commit_super(fs_info); 3812 3818 3813 3819 kthread_stop(fs_info->transaction_kthread);
+4 -16
fs/btrfs/disk-io.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __DISKIO__ 20 - #define __DISKIO__ 6 + #ifndef BTRFS_DISK_IO_H 7 + #define BTRFS_DISK_IO_H 21 8 22 9 #define BTRFS_SUPER_INFO_OFFSET SZ_64K 23 10 #define BTRFS_SUPER_INFO_SIZE 4096 ··· 156 169 { 157 170 } 158 171 #endif 172 + 159 173 #endif
+1
fs/btrfs/export.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + 2 3 #include <linux/fs.h> 3 4 #include <linux/types.h> 4 5 #include "ctree.h"
+1
fs/btrfs/export.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 + 2 3 #ifndef BTRFS_EXPORT_H 3 4 #define BTRFS_EXPORT_H 4 5
+3 -14
fs/btrfs/extent-tree.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 5 + 18 6 #include <linux/sched.h> 19 7 #include <linux/sched/signal.h> 20 8 #include <linux/pagemap.h> ··· 4630 4642 if (wait_for_alloc) { 4631 4643 mutex_unlock(&fs_info->chunk_mutex); 4632 4644 wait_for_alloc = 0; 4645 + cond_resched(); 4633 4646 goto again; 4634 4647 } 4635 4648
+1
fs/btrfs/extent_io.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + 2 3 #include <linux/bitops.h> 3 4 #include <linux/slab.h> 4 5 #include <linux/bio.h>
+4 -2
fs/btrfs/extent_io.h
··· 1 1 /* 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 4 5 5 6 #include <linux/rbtree.h> 6 7 #include <linux/refcount.h> ··· 573 572 #endif 574 573 struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info, 575 574 u64 start); 575 + 576 576 #endif
+1
fs/btrfs/extent_map.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + 2 3 #include <linux/err.h> 3 4 #include <linux/slab.h> 4 5 #include <linux/spinlock.h>
+4 -2
fs/btrfs/extent_map.h
··· 1 1 /* 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 4 5 5 6 #include <linux/rbtree.h> 6 7 #include <linux/refcount.h> ··· 94 93 u64 start, u64 len); 95 94 int btrfs_add_extent_mapping(struct extent_map_tree *em_tree, 96 95 struct extent_map **em_in, u64 start, u64 len); 96 + 97 97 #endif
+1 -14
fs/btrfs/file-item.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/bio.h>
+1 -14
fs/btrfs/file.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/fs.h>
+1 -14
fs/btrfs/free-space-cache.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2008 Red Hat. 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. 17 4 */ 18 5 19 6 #include <linux/pagemap.h>
+3 -16
fs/btrfs/free-space-cache.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 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 21 8 22 9 struct btrfs_free_space { 23 10 struct rb_node offset_index;
+1 -14
fs/btrfs/free-space-tree.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2015 Facebook. 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. 17 4 */ 18 5 19 6 #include <linux/kernel.h>
+3 -16
fs/btrfs/free-space-tree.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2015 Facebook. 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_FREE_SPACE_TREE 20 - #define __BTRFS_FREE_SPACE_TREE 6 + #ifndef BTRFS_FREE_SPACE_TREE_H 7 + #define BTRFS_FREE_SPACE_TREE_H 21 8 22 9 /* 23 10 * The default size for new free space bitmap items. The last bitmap in a block
+1 -14
fs/btrfs/inode-item.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include "ctree.h"
+1 -14
fs/btrfs/inode-map.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/delay.h>
+3 -2
fs/btrfs/inode-map.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef __BTRFS_INODE_MAP 3 - #define __BTRFS_INODE_MAP 2 + 3 + #ifndef BTRFS_INODE_MAP_H 4 + #define BTRFS_INODE_MAP_H 4 5 5 6 void btrfs_init_free_ino_ctl(struct btrfs_root *root); 6 7 void btrfs_unpin_free_ino(struct btrfs_root *root);
+1 -14
fs/btrfs/inode.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/kernel.h>
+1 -14
fs/btrfs/ioctl.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/kernel.h>
+2 -14
fs/btrfs/locking.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 5 + 18 6 #include <linux/sched.h> 19 7 #include <linux/pagemap.h> 20 8 #include <linux/spinlock.h>
+3 -16
fs/btrfs/locking.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_LOCKING_ 20 - #define __BTRFS_LOCKING_ 6 + #ifndef BTRFS_LOCKING_H 7 + #define BTRFS_LOCKING_H 21 8 22 9 #define BTRFS_WRITE_LOCK 1 23 10 #define BTRFS_READ_LOCK 2
+1 -14
fs/btrfs/lzo.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/kernel.h>
+3 -17
fs/btrfs/math.h
··· 1 - 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* 3 3 * Copyright (C) 2012 Fujitsu. All rights reserved. 4 4 * Written by Miao Xie <miaox@cn.fujitsu.com> 5 - * 6 - * This program is free software; you can redistribute it and/or 7 - * modify it under the terms of the GNU General Public 8 - * License v2 as published by the Free Software Foundation. 9 - * 10 - * This program is distributed in the hope that it will be useful, 11 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 - * General Public License for more details. 14 - * 15 - * You should have received a copy of the GNU General Public 16 - * License along with this program; if not, write to the 17 - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 - * Boston, MA 021110-1307, USA. 19 5 */ 20 6 21 - #ifndef __BTRFS_MATH_H 22 - #define __BTRFS_MATH_H 7 + #ifndef BTRFS_MATH_H 8 + #define BTRFS_MATH_H 23 9 24 10 #include <asm/div64.h> 25 11
+1 -14
fs/btrfs/ordered-data.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/slab.h>
+4 -16
fs/btrfs/ordered-data.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_ORDERED_DATA__ 20 - #define __BTRFS_ORDERED_DATA__ 6 + #ifndef BTRFS_ORDERED_DATA_H 7 + #define BTRFS_ORDERED_DATA_H 21 8 22 9 /* one of these per inode */ 23 10 struct btrfs_ordered_inode_tree { ··· 205 218 void btrfs_free_logged_extents(struct btrfs_root *log, u64 transid); 206 219 int __init ordered_data_init(void); 207 220 void __cold ordered_data_exit(void); 221 + 208 222 #endif
+1 -14
fs/btrfs/orphan.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2008 Red Hat. 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. 17 4 */ 18 5 19 6 #include "ctree.h"
+1 -14
fs/btrfs/print-tree.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include "ctree.h"
+5 -16
fs/btrfs/print-tree.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __PRINT_TREE_ 20 - #define __PRINT_TREE_ 6 + #ifndef BTRFS_PRINT_TREE_H 7 + #define BTRFS_PRINT_TREE_H 8 + 21 9 void btrfs_print_leaf(struct extent_buffer *l); 22 10 void btrfs_print_tree(struct extent_buffer *c); 11 + 23 12 #endif
+1 -14
fs/btrfs/props.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2014 Filipe David Borba Manana <fdmanana@gmail.com> 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. 17 4 */ 18 5 19 6 #include <linux/hashtable.h>
+3 -16
fs/btrfs/props.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2014 Filipe David Borba Manana <fdmanana@gmail.com> 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_PROPS_H 20 - #define __BTRFS_PROPS_H 6 + #ifndef BTRFS_PROPS_H 7 + #define BTRFS_PROPS_H 21 8 22 9 #include "ctree.h" 23 10
+1 -14
fs/btrfs/qgroup.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/sched.h>
+5 -17
fs/btrfs/qgroup.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2014 Facebook. 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_QGROUP__ 20 - #define __BTRFS_QGROUP__ 6 + #ifndef BTRFS_QGROUP_H 7 + #define BTRFS_QGROUP_H 21 8 22 9 #include "ulist.h" 23 10 #include "delayed-ref.h" ··· 328 341 void btrfs_qgroup_convert_reserved_meta(struct btrfs_root *root, int num_bytes); 329 342 330 343 void btrfs_qgroup_check_reserved_leak(struct inode *inode); 331 - #endif /* __BTRFS_QGROUP__ */ 344 + 345 + #endif
+2 -14
fs/btrfs/raid56.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2012 Fusion-io All rights reserved. 3 4 * Copyright (C) 2012 Intel Corp. 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. 18 5 */ 6 + 19 7 #include <linux/sched.h> 20 8 #include <linux/wait.h> 21 9 #include <linux/bio.h>
+5 -16
fs/btrfs/raid56.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2012 Fusion-io All rights reserved. 3 4 * Copyright (C) 2012 Intel Corp. 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. 18 5 */ 19 6 20 - #ifndef __BTRFS_RAID56__ 21 - #define __BTRFS_RAID56__ 7 + #ifndef BTRFS_RAID56_H 8 + #define BTRFS_RAID56_H 9 + 22 10 static inline int nr_parity_stripes(struct map_lookup *map) 23 11 { 24 12 if (map->type & BTRFS_BLOCK_GROUP_RAID5) ··· 53 65 54 66 int btrfs_alloc_stripe_hash_table(struct btrfs_fs_info *info); 55 67 void btrfs_free_stripe_hash_table(struct btrfs_fs_info *info); 68 + 56 69 #endif
+6 -14
fs/btrfs/rcu-string.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2012 Red Hat. 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. 17 4 */ 5 + 6 + #ifndef BTRFS_RCU_STRING_H 7 + #define BTRFS_RCU_STRING_H 18 8 19 9 struct rcu_string { 20 10 struct rcu_head rcu; ··· 44 54 struct rcu_string *__str = rcu_dereference(rcu_str); \ 45 55 __str->str; \ 46 56 }) 57 + 58 + #endif
+1 -14
fs/btrfs/reada.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/sched.h>
+1 -14
fs/btrfs/ref-verify.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2014 Facebook. 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. 17 4 */ 18 5 19 6 #include <linux/sched.h>
+6 -17
fs/btrfs/ref-verify.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2014 Facebook. 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. 17 4 */ 18 - #ifndef __REF_VERIFY__ 19 - #define __REF_VERIFY__ 5 + 6 + #ifndef BTRFS_REF_VERIFY_H 7 + #define BTRFS_REF_VERIFY_H 20 8 21 9 #ifdef CONFIG_BTRFS_FS_REF_VERIFY 22 10 int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info); ··· 47 59 } 48 60 49 61 #endif /* CONFIG_BTRFS_FS_REF_VERIFY */ 50 - #endif /* _REF_VERIFY__ */ 62 + 63 + #endif
+1 -14
fs/btrfs/relocation.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/sched.h>
+1 -14
fs/btrfs/root-tree.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/err.h>
+1 -14
fs/btrfs/scrub.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2011, 2012 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. 17 4 */ 18 5 19 6 #include <linux/blkdev.h>
+1 -14
fs/btrfs/send.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2012 Alexander Block. 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. 17 4 */ 18 5 19 6 #include <linux/bsearch.h>
+6 -14
fs/btrfs/send.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2012 Alexander Block. All rights reserved. 3 4 * Copyright (C) 2012 STRATO. 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. 18 5 */ 6 + 7 + #ifndef BTRFS_SEND_H 8 + #define BTRFS_SEND_H 19 9 20 10 #include "ctree.h" 21 11 ··· 121 131 122 132 #ifdef __KERNEL__ 123 133 long btrfs_ioctl_send(struct file *mnt_file, struct btrfs_ioctl_send_args *arg); 134 + #endif 135 + 124 136 #endif
+1 -14
fs/btrfs/struct-funcs.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/highmem.h>
+1 -14
fs/btrfs/super.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/blkdev.h>
+1 -14
fs/btrfs/sysfs.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/sched.h>
+4 -3
fs/btrfs/sysfs.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _BTRFS_SYSFS_H_ 3 - #define _BTRFS_SYSFS_H_ 2 + 3 + #ifndef BTRFS_SYSFS_H 4 + #define BTRFS_SYSFS_H 4 5 5 6 /* 6 7 * Data exported through sysfs ··· 91 90 void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info, 92 91 u64 bit, enum btrfs_feature_set set); 93 92 94 - #endif /* _BTRFS_SYSFS_H_ */ 93 + #endif
+1 -14
fs/btrfs/tests/btrfs-tests.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2013 Fusion IO. 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. 17 4 */ 18 5 19 6 #include <linux/fs.h>
+3 -16
fs/btrfs/tests/btrfs-tests.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2013 Fusion IO. 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_TESTS 20 - #define __BTRFS_TESTS 6 + #ifndef BTRFS_TESTS_H 7 + #define BTRFS_TESTS_H 21 8 22 9 #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS 23 10 int btrfs_run_sanity_tests(void);
+1 -14
fs/btrfs/tests/extent-buffer-tests.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2013 Fusion IO. 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. 17 4 */ 18 5 19 6 #include <linux/slab.h>
+1 -14
fs/btrfs/tests/extent-io-tests.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2013 Fusion IO. 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. 17 4 */ 18 5 19 6 #include <linux/pagemap.h>
+1 -14
fs/btrfs/tests/extent-map-tests.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2017 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. 17 4 */ 18 5 19 6 #include <linux/types.h>
+1 -14
fs/btrfs/tests/free-space-tests.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2013 Fusion IO. 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. 17 4 */ 18 5 19 6 #include <linux/slab.h>
+1 -14
fs/btrfs/tests/free-space-tree-tests.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2015 Facebook. 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. 17 4 */ 18 5 19 6 #include <linux/types.h>
+1 -14
fs/btrfs/tests/inode-tests.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2013 Fusion IO. 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. 17 4 */ 18 5 19 6 #include <linux/types.h>
+1 -14
fs/btrfs/tests/qgroup-tests.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2013 Facebook. 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. 17 4 */ 18 5 19 6 #include <linux/types.h>
+1 -14
fs/btrfs/transaction.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/fs.h>
+4 -16
fs/btrfs/transaction.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_TRANSACTION__ 20 - #define __BTRFS_TRANSACTION__ 6 + #ifndef BTRFS_TRANSACTION_H 7 + #define BTRFS_TRANSACTION_H 21 8 22 9 #include <linux/refcount.h> 23 10 #include "btrfs_inode.h" ··· 215 228 void btrfs_apply_pending_changes(struct btrfs_fs_info *fs_info); 216 229 void btrfs_add_dropped_root(struct btrfs_trans_handle *trans, 217 230 struct btrfs_root *root); 231 + 218 232 #endif
+1 -12
fs/btrfs/tree-checker.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) Qu Wenruo 2017. 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. 15 4 */ 16 5 17 6 /*
+3 -14
fs/btrfs/tree-checker.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) Qu Wenruo 2017. 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. 15 4 */ 16 5 17 - #ifndef __BTRFS_TREE_CHECKER__ 18 - #define __BTRFS_TREE_CHECKER__ 6 + #ifndef BTRFS_TREE_CHECKER_H 7 + #define BTRFS_TREE_CHECKER_H 19 8 20 9 #include "ctree.h" 21 10 #include "extent_io.h"
+1 -14
fs/btrfs/tree-defrag.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/sched.h>
+67 -22
fs/btrfs/tree-log.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 6 #include <linux/sched.h> ··· 2339 2352 nritems = btrfs_header_nritems(path->nodes[0]); 2340 2353 if (path->slots[0] >= nritems) { 2341 2354 ret = btrfs_next_leaf(root, path); 2342 - if (ret) 2355 + if (ret == 1) 2343 2356 break; 2357 + else if (ret < 0) 2358 + goto out; 2344 2359 } 2345 2360 btrfs_item_key_to_cpu(path->nodes[0], &found_key, 2346 2361 path->slots[0]); ··· 2445 2456 if (ret) 2446 2457 break; 2447 2458 2448 - /* for regular files, make sure corresponding 2449 - * orphan item exist. extents past the new EOF 2450 - * will be truncated later by orphan cleanup. 2459 + /* 2460 + * Before replaying extents, truncate the inode to its 2461 + * size. We need to do it now and not after log replay 2462 + * because before an fsync we can have prealloc extents 2463 + * added beyond the inode's i_size. If we did it after, 2464 + * through orphan cleanup for example, we would drop 2465 + * those prealloc extents just after replaying them. 2451 2466 */ 2452 2467 if (S_ISREG(mode)) { 2453 - ret = insert_orphan_item(wc->trans, root, 2454 - key.objectid); 2468 + struct inode *inode; 2469 + u64 from; 2470 + 2471 + inode = read_one_inode(root, key.objectid); 2472 + if (!inode) { 2473 + ret = -EIO; 2474 + break; 2475 + } 2476 + from = ALIGN(i_size_read(inode), 2477 + root->fs_info->sectorsize); 2478 + ret = btrfs_drop_extents(wc->trans, root, inode, 2479 + from, (u64)-1, 1); 2480 + /* 2481 + * If the nlink count is zero here, the iput 2482 + * will free the inode. We bump it to make 2483 + * sure it doesn't get freed until the link 2484 + * count fixup is done. 2485 + */ 2486 + if (!ret) { 2487 + if (inode->i_nlink == 0) 2488 + inc_nlink(inode); 2489 + /* Update link count and nbytes. */ 2490 + ret = btrfs_update_inode(wc->trans, 2491 + root, inode); 2492 + } 2493 + iput(inode); 2455 2494 if (ret) 2456 2495 break; 2457 2496 } ··· 3537 3520 * from this directory and from this transaction 3538 3521 */ 3539 3522 ret = btrfs_next_leaf(root, path); 3540 - if (ret == 1) { 3541 - last_offset = (u64)-1; 3523 + if (ret) { 3524 + if (ret == 1) 3525 + last_offset = (u64)-1; 3526 + else 3527 + err = ret; 3542 3528 goto done; 3543 3529 } 3544 3530 btrfs_item_key_to_cpu(path->nodes[0], &tmp, path->slots[0]); ··· 4372 4352 set_bit(EXTENT_FLAG_LOGGING, &em->flags); 4373 4353 list_add_tail(&em->list, &extents); 4374 4354 num++; 4355 + } 4356 + 4357 + /* 4358 + * Add all prealloc extents beyond the inode's i_size to make sure we 4359 + * don't lose them after doing a fast fsync and replaying the log. 4360 + */ 4361 + if (inode->flags & BTRFS_INODE_PREALLOC) { 4362 + struct rb_node *node; 4363 + 4364 + for (node = rb_last(&tree->map); node; node = rb_prev(node)) { 4365 + em = rb_entry(node, struct extent_map, rb_node); 4366 + if (em->start < i_size_read(&inode->vfs_inode)) 4367 + break; 4368 + if (!list_empty(&em->list)) 4369 + continue; 4370 + /* Same as above loop. */ 4371 + if (++num > 32768) { 4372 + list_del_init(&tree->modified_extents); 4373 + ret = -EFBIG; 4374 + goto process; 4375 + } 4376 + refcount_inc(&em->refs); 4377 + set_bit(EXTENT_FLAG_LOGGING, &em->flags); 4378 + list_add_tail(&em->list, &extents); 4379 + } 4375 4380 } 4376 4381 4377 4382 list_sort(NULL, &extents, extent_cmp);
+4 -16
fs/btrfs/tree-log.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __TREE_LOG_ 20 - #define __TREE_LOG_ 6 + #ifndef BTRFS_TREE_LOG_H 7 + #define BTRFS_TREE_LOG_H 21 8 22 9 #include "ctree.h" 23 10 #include "transaction.h" ··· 74 87 int btrfs_log_new_name(struct btrfs_trans_handle *trans, 75 88 struct btrfs_inode *inode, struct btrfs_inode *old_dir, 76 89 struct dentry *parent); 90 + 77 91 #endif
+1 -1
fs/btrfs/ulist.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2011 STRATO AG 3 4 * written by Arne Jansen <sensille@gmx.net> 4 - * Distributed under the GNU GPL license version 2. 5 5 */ 6 6 7 7 #include <linux/slab.h>
+3 -4
fs/btrfs/ulist.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2011 STRATO AG 3 4 * written by Arne Jansen <sensille@gmx.net> 4 - * Distributed under the GNU GPL license version 2. 5 - * 6 5 */ 7 6 8 - #ifndef __ULIST__ 9 - #define __ULIST__ 7 + #ifndef BTRFS_ULIST_H 8 + #define BTRFS_ULIST_H 10 9 11 10 #include <linux/list.h> 12 11 #include <linux/rbtree.h>
+2 -14
fs/btrfs/uuid-tree.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) STRATO AG 2013. 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. 17 4 */ 5 + 18 6 #include <linux/uuid.h> 19 7 #include <asm/unaligned.h> 20 8 #include "ctree.h"
+2 -14
fs/btrfs/volumes.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 */ 5 + 18 6 #include <linux/sched.h> 19 7 #include <linux/bio.h> 20 8 #include <linux/slab.h>
+3 -16
fs/btrfs/volumes.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * 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. 17 4 */ 18 5 19 - #ifndef __BTRFS_VOLUMES_ 20 - #define __BTRFS_VOLUMES_ 6 + #ifndef BTRFS_VOLUMES_H 7 + #define BTRFS_VOLUMES_H 21 8 22 9 #include <linux/bio.h> 23 10 #include <linux/sort.h>
+1 -15
fs/btrfs/xattr.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) 2007 Red Hat. 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. 17 4 */ 18 5 19 6 #include <linux/init.h> ··· 18 31 #include "disk-io.h" 19 32 #include "props.h" 20 33 #include "locking.h" 21 - 22 34 23 35 int btrfs_getxattr(struct inode *inode, const char *name, 24 36 void *buffer, size_t size)
+4 -17
fs/btrfs/xattr.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 2 3 * Copyright (C) 2007 Red Hat. 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. 17 4 */ 18 5 19 - #ifndef __XATTR__ 20 - #define __XATTR__ 6 + #ifndef BTRFS_XATTR_H 7 + #define BTRFS_XATTR_H 21 8 22 9 #include <linux/xattr.h> 23 10 ··· 21 34 struct inode *inode, struct inode *dir, 22 35 const struct qstr *qstr); 23 36 24 - #endif /* __XATTR__ */ 37 + #endif
+1 -14
fs/btrfs/zlib.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * 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. 17 4 * 18 5 * Based on jffs2 zlib code: 19 6 * Copyright © 2001-2007 Red Hat, Inc.
+2 -8
fs/btrfs/zstd.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (c) 2016-present, Facebook, Inc. 3 4 * All rights reserved. 4 5 * 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 6 */ 7 + 14 8 #include <linux/bio.h> 15 9 #include <linux/err.h> 16 10 #include <linux/init.h>