Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
0eae2747
Commit
0eae2747
authored
Nov 12, 2014
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: move commit out of sysfs when changing features
Signed-off-by:
David Sterba
<
dsterba@suse.cz
>
parent
d51033d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
fs/btrfs/sysfs.c
fs/btrfs/sysfs.c
+5
-8
No files found.
fs/btrfs/sysfs.c
View file @
0eae2747
...
...
@@ -111,7 +111,6 @@ static ssize_t btrfs_feature_attr_store(struct kobject *kobj,
{
struct
btrfs_fs_info
*
fs_info
;
struct
btrfs_feature_attr
*
fa
=
to_btrfs_feature_attr
(
a
);
struct
btrfs_trans_handle
*
trans
;
u64
features
,
set
,
clear
;
unsigned
long
val
;
int
ret
;
...
...
@@ -153,10 +152,6 @@ static ssize_t btrfs_feature_attr_store(struct kobject *kobj,
btrfs_info
(
fs_info
,
"%s %s feature flag"
,
val
?
"Setting"
:
"Clearing"
,
fa
->
kobj_attr
.
attr
.
name
);
trans
=
btrfs_start_transaction
(
fs_info
->
fs_root
,
0
);
if
(
IS_ERR
(
trans
))
return
PTR_ERR
(
trans
);
spin_lock
(
&
fs_info
->
super_lock
);
features
=
get_features
(
fs_info
,
fa
->
feature_set
);
if
(
val
)
...
...
@@ -166,9 +161,11 @@ static ssize_t btrfs_feature_attr_store(struct kobject *kobj,
set_features
(
fs_info
,
fa
->
feature_set
,
features
);
spin_unlock
(
&
fs_info
->
super_lock
);
ret
=
btrfs_commit_transaction
(
trans
,
fs_info
->
fs_root
);
if
(
ret
)
return
ret
;
/*
* We don't want to do full transaction commit from inside sysfs
*/
btrfs_set_pending
(
fs_info
,
COMMIT
);
wake_up_process
(
fs_info
->
transaction_kthread
);
return
count
;
}
...
...
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