const: constify remaining dev_pm_ops
[safe/jmp/linux-2.6] / fs / gfs2 / sys.c
index 0d4f7e9..c5dad1e 100644 (file)
@@ -158,7 +158,7 @@ static ssize_t statfs_sync_store(struct gfs2_sbd *sdp, const char *buf,
        if (simple_strtol(buf, NULL, 0) != 1)
                return -EINVAL;
 
-       gfs2_statfs_sync(sdp);
+       gfs2_statfs_sync(sdp->sd_vfs, 0);
        return len;
 }
 
@@ -171,13 +171,14 @@ static ssize_t quota_sync_store(struct gfs2_sbd *sdp, const char *buf,
        if (simple_strtol(buf, NULL, 0) != 1)
                return -EINVAL;
 
-       gfs2_quota_sync(sdp);
+       gfs2_quota_sync(sdp->sd_vfs, 0);
        return len;
 }
 
 static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf,
                                        size_t len)
 {
+       int error;
        u32 id;
 
        if (!capable(CAP_SYS_ADMIN))
@@ -185,13 +186,14 @@ static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf,
 
        id = simple_strtoul(buf, NULL, 0);
 
-       gfs2_quota_refresh(sdp, 1, id);
-       return len;
+       error = gfs2_quota_refresh(sdp, 1, id);
+       return error ? error : len;
 }
 
 static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf,
                                         size_t len)
 {
+       int error;
        u32 id;
 
        if (!capable(CAP_SYS_ADMIN))
@@ -199,8 +201,8 @@ static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf,
 
        id = simple_strtoul(buf, NULL, 0);
 
-       gfs2_quota_refresh(sdp, 0, id);
-       return len;
+       error = gfs2_quota_refresh(sdp, 0, id);
+       return error ? error : len;
 }
 
 static ssize_t demote_rq_store(struct gfs2_sbd *sdp, const char *buf, size_t len)
@@ -320,12 +322,6 @@ static ssize_t block_store(struct gfs2_sbd *sdp, const char *buf, size_t len)
        return ret;
 }
 
-static ssize_t lkid_show(struct gfs2_sbd *sdp, char *buf)
-{
-       struct lm_lockstruct *ls = &sdp->sd_lockstruct;
-       return sprintf(buf, "%u\n", ls->ls_id);
-}
-
 static ssize_t lkfirst_show(struct gfs2_sbd *sdp, char *buf)
 {
        struct lm_lockstruct *ls = &sdp->sd_lockstruct;
@@ -390,7 +386,6 @@ static struct gfs2_attr gdlm_attr_##_name = __ATTR(_name,_mode,_show,_store)
 GDLM_ATTR(proto_name,          0444, proto_name_show,          NULL);
 GDLM_ATTR(block,               0644, block_show,               block_store);
 GDLM_ATTR(withdraw,            0644, withdraw_show,            withdraw_store);
-GDLM_ATTR(id,                  0444, lkid_show,                NULL);
 GDLM_ATTR(jid,                 0444, jid_show,                 NULL);
 GDLM_ATTR(first,               0444, lkfirst_show,             NULL);
 GDLM_ATTR(first_done,          0444, first_done_show,          NULL);
@@ -402,7 +397,6 @@ static struct attribute *lock_module_attrs[] = {
        &gdlm_attr_proto_name.attr,
        &gdlm_attr_block.attr,
        &gdlm_attr_withdraw.attr,
-       &gdlm_attr_id.attr,
        &gdlm_attr_jid.attr,
        &gdlm_attr_first.attr,
        &gdlm_attr_first_done.attr,