Commit 0b02c8c
xfs: set prealloc flag in xfs_alloc_file_space()
Now that we only call xfs_update_prealloc_flags() from
xfs_file_fallocate() in the case where we need to set the
preallocation flag, do this in xfs_alloc_file_space() where we
already have the inode joined into a transaction and get
rid of the call to xfs_update_prealloc_flags() from the fallocate
code.
This also means that we now correctly avoid setting the
XFS_DIFLAG_PREALLOC flag when xfs_is_always_cow_inode() is true, as
these inodes will never have preallocated extents.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>1 parent fbe7e52 commit 0b02c8c
2 files changed
Lines changed: 3 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
850 | 850 | | |
851 | 851 | | |
852 | 852 | | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | 853 | | |
857 | 854 | | |
858 | 855 | | |
| |||
869 | 866 | | |
870 | 867 | | |
871 | 868 | | |
872 | | - | |
873 | | - | |
874 | | - | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
875 | 872 | | |
876 | 873 | | |
877 | 874 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | | - | |
912 | 911 | | |
913 | 912 | | |
914 | 913 | | |
| |||
1006 | 1005 | | |
1007 | 1006 | | |
1008 | 1007 | | |
1009 | | - | |
1010 | | - | |
1011 | 1008 | | |
1012 | 1009 | | |
1013 | 1010 | | |
| |||
1057 | 1054 | | |
1058 | 1055 | | |
1059 | 1056 | | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | 1057 | | |
1066 | 1058 | | |
1067 | 1059 | | |
| |||
0 commit comments