forked from Minki/linux
Two more gfs2 fixes
-----BEGIN PGP SIGNATURE----- iQJIBAABCAAyFiEEJZs3krPW0xkhLMTc1b+f6wMTZToFAmBomgAUHGFncnVlbmJh QHJlZGhhdC5jb20ACgkQ1b+f6wMTZTqWkA//bGV+XgrDas0mBjAQiGBcqC9M1Ts1 cffrJ2E9E5J/Cnn+/wAmkGYZU3oHpdmNI4DytCneHhfY9YamSlg6B9MDxebF3Iuu eXiWB4rXEf7l5AG5ywUloXl171TTxOQDo5bbOlvYeDWPZ/WYEBsdZ/rxF9yIent/ RS5HMt9I9x6c2WQGTlBvo8D618WyfxzkX5AjvhojITgX5UItZg6bOKkcuqcQ9PNG 5MGnHCCJU2Zh3Y6gGZjp3rQnxRAzpBhFdVrXaZgTAtKLycsGHMcjqfmST6N2si8l cCDgujRhRfIOpQZs0vOdcJVtpNBfDxgOO5JlTdkY6Grh/STYoN9dFo7V0SnYhMJE FdBgfHwNyyBEo/QV3gDXrvITxw+xypACjS/znffArxFySNzSfv2oWPCxOJvbel0L H4y+gbJ4R+QUzkUuvnXjxjl7c70jK+flLbzUxXxeSQBmOHtCiHZJK43UnCq+fpmZ hOrUaYHvCV1iC/9OeAy1N8MlXicUHnpmu/7q7GEGaRTV4zN85MjddOiRKAz6RiAl 2nB64GbLDFjY3HF8+/giEwAWikcYPk2W8S0WmX9Bjn+UdMYuH1cWF/TLwWrSmQJX MQmYlwLOj+UKg8Ku0+Klh2c8oMxo7C8o9t9BjBJio5od0U/sen9v/08DUobk4jwN hhjW+as1ZV/+Tpc= =TP8w -----END PGP SIGNATURE----- Merge tag 'gfs2-v5.12-rc2-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fixes from Andreas Gruenbacher: "Two more gfs2 fixes" * tag 'gfs2-v5.12-rc2-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: report "already frozen/thawed" errors gfs2: Flag a withdraw if init_threads() fails
This commit is contained in:
commit
8e29be3468
@ -162,8 +162,10 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp)
|
||||
int error;
|
||||
|
||||
error = init_threads(sdp);
|
||||
if (error)
|
||||
if (error) {
|
||||
gfs2_withdraw_delayed(sdp);
|
||||
return error;
|
||||
}
|
||||
|
||||
j_gl->gl_ops->go_inval(j_gl, DIO_METADATA);
|
||||
if (gfs2_withdrawn(sdp)) {
|
||||
@ -750,11 +752,13 @@ void gfs2_freeze_func(struct work_struct *work)
|
||||
static int gfs2_freeze(struct super_block *sb)
|
||||
{
|
||||
struct gfs2_sbd *sdp = sb->s_fs_info;
|
||||
int error = 0;
|
||||
int error;
|
||||
|
||||
mutex_lock(&sdp->sd_freeze_mutex);
|
||||
if (atomic_read(&sdp->sd_freeze_state) != SFS_UNFROZEN)
|
||||
if (atomic_read(&sdp->sd_freeze_state) != SFS_UNFROZEN) {
|
||||
error = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
if (gfs2_withdrawn(sdp)) {
|
||||
@ -795,10 +799,10 @@ static int gfs2_unfreeze(struct super_block *sb)
|
||||
struct gfs2_sbd *sdp = sb->s_fs_info;
|
||||
|
||||
mutex_lock(&sdp->sd_freeze_mutex);
|
||||
if (atomic_read(&sdp->sd_freeze_state) != SFS_FROZEN ||
|
||||
if (atomic_read(&sdp->sd_freeze_state) != SFS_FROZEN ||
|
||||
!gfs2_holder_initialized(&sdp->sd_freeze_gh)) {
|
||||
mutex_unlock(&sdp->sd_freeze_mutex);
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
gfs2_freeze_unlock(&sdp->sd_freeze_gh);
|
||||
|
Loading…
Reference in New Issue
Block a user