diff --git a/drivers/staging/blackbox/blackbox_common.c b/drivers/staging/blackbox/blackbox_common.c index 593ea92836b4c25f4d6d2442f7db7936c999a6e6..44bc2aa185f143c18ad2a6d5cc5e344fee418511 100644 --- a/drivers/staging/blackbox/blackbox_common.c +++ b/drivers/staging/blackbox/blackbox_common.c @@ -55,7 +55,7 @@ int full_write_file(const char *pfile_path, char *buf, } filp = file_open(pfile_path, O_CREAT | O_RDWR | - (is_append ? O_APPEND : O_TRUNC), 0); + (is_append ? O_APPEND : O_TRUNC), BBOX_FILE_LIMIT); if (IS_ERR(filp)) { bbox_print_err("open %s failed! [%ld]\n", pfile_path, PTR_ERR(filp)); return -EBADF; @@ -113,8 +113,6 @@ static int create_new_dir(char *name) ret = vfs_mkdir(d_inode(path.dentry), dentry, BBOX_DIR_LIMIT); if (ret && ret != -EEXIST) bbox_print_err("Create dir [%s] failed! ret: %d\n", name, ret); - else - change_own(name, AID_ROOT, AID_SYSTEM); done_path_create(&path, dentry); } diff --git a/drivers/staging/blackbox/blackbox_core.c b/drivers/staging/blackbox/blackbox_core.c index ec64088029f01684662db1294fec0d2ad8597b38..ff23b0593f094ae56f7136bf845e6faedb494bec 100644 --- a/drivers/staging/blackbox/blackbox_core.c +++ b/drivers/staging/blackbox/blackbox_core.c @@ -227,7 +227,6 @@ static void save_history_log(const char *log_root_dir, struct error_info *info, scnprintf(history_log_path, sizeof(history_log_path) - 1, "%s/%s", log_root_dir, HISTORY_LOG_NAME); full_write_file(history_log_path, buf, strlen(buf), 1); - change_own(history_log_path, AID_ROOT, AID_SYSTEM); ksys_sync(); kfree(buf); }