Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
f392a938
Commit
f392a938
authored
Jan 30, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly align the hole size in btrfs_setattr
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
b1632b10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fs/btrfs/inode.c
fs/btrfs/inode.c
+3
-3
No files found.
fs/btrfs/inode.c
View file @
f392a938
...
...
@@ -1001,7 +1001,7 @@ static int btrfs_setattr(struct dentry *dentry, struct iattr *attr)
u64
mask
=
root
->
sectorsize
-
1
;
u64
pos
=
(
inode
->
i_size
+
mask
)
&
~
mask
;
u64
block_end
=
attr
->
ia_size
|
mask
;
u64
block_end
=
(
attr
->
ia_size
+
mask
)
&
~
mask
;
u64
hole_start
;
u64
hole_size
;
u64
alloc_hint
=
0
;
...
...
@@ -1022,7 +1022,7 @@ static int btrfs_setattr(struct dentry *dentry, struct iattr *attr)
btrfs_truncate_page
(
inode
->
i_mapping
,
inode
->
i_size
);
lock_extent
(
io_tree
,
pos
,
block_end
,
GFP_NOFS
);
lock_extent
(
io_tree
,
pos
,
block_end
-
1
,
GFP_NOFS
);
hole_size
=
block_end
-
hole_start
;
mutex_lock
(
&
root
->
fs_info
->
fs_mutex
);
...
...
@@ -1043,7 +1043,7 @@ static int btrfs_setattr(struct dentry *dentry, struct iattr *attr)
}
btrfs_end_transaction
(
trans
,
root
);
mutex_unlock
(
&
root
->
fs_info
->
fs_mutex
);
unlock_extent
(
io_tree
,
pos
,
block_end
,
GFP_NOFS
);
unlock_extent
(
io_tree
,
pos
,
block_end
-
1
,
GFP_NOFS
);
if
(
err
)
return
err
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment