Lines Matching refs:err
202 int err; in ubifs_lookup() local
220 err = ubifs_tnc_lookup_nm(c, &key, dent, &dentry->d_name); in ubifs_lookup()
221 if (err) { in ubifs_lookup()
222 if (err == -ENOENT) { in ubifs_lookup()
230 err = -EINVAL; in ubifs_lookup()
240 err = PTR_ERR(inode); in ubifs_lookup()
242 dentry->d_name.len, dentry->d_name.name, err); in ubifs_lookup()
243 ubifs_ro_mode(c, err); in ubifs_lookup()
258 return ERR_PTR(err); in ubifs_lookup()
266 int err, sz_change = CALC_DENT_SIZE(dentry->d_name.len); in ubifs_create() local
279 err = ubifs_budget_space(c, &req); in ubifs_create()
280 if (err) in ubifs_create()
281 return err; in ubifs_create()
285 err = PTR_ERR(inode); in ubifs_create()
293 err = ubifs_jnl_update(c, dir, &dentry->d_name, inode, 0, 0); in ubifs_create()
294 if (err) in ubifs_create()
311 ubifs_err("cannot create regular file, error %d", err); in ubifs_create()
312 return err; in ubifs_create()
364 int err, over = 0; in ubifs_readdir() local
401 err = PTR_ERR(dent); in ubifs_readdir()
420 err = PTR_ERR(dent); in ubifs_readdir()
446 err = PTR_ERR(dent); in ubifs_readdir()
457 if (err != -ENOENT) { in ubifs_readdir()
458 ubifs_err("cannot find next direntry, error %d", err); in ubifs_readdir()
459 return err; in ubifs_readdir()
517 int err, sz_change = CALC_DENT_SIZE(dentry->d_name.len); in ubifs_link() local
531 err = dbg_check_synced_i_size(inode); in ubifs_link()
532 if (err) in ubifs_link()
533 return err; in ubifs_link()
535 err = ubifs_budget_space(c, &req); in ubifs_link()
536 if (err) in ubifs_link()
537 return err; in ubifs_link()
546 err = ubifs_jnl_update(c, dir, &dentry->d_name, inode, 0, 0); in ubifs_link()
547 if (err) in ubifs_link()
562 return err; in ubifs_link()
571 int err, budgeted = 1; in ubifs_unlink() local
586 err = dbg_check_synced_i_size(inode); in ubifs_unlink()
587 if (err) in ubifs_unlink()
588 return err; in ubifs_unlink()
590 err = ubifs_budget_space(c, &req); in ubifs_unlink()
591 if (err) { in ubifs_unlink()
592 if (err != -ENOSPC) in ubifs_unlink()
593 return err; in ubifs_unlink()
603 err = ubifs_jnl_update(c, dir, &dentry->d_name, inode, 1, 0); in ubifs_unlink()
604 if (err) in ubifs_unlink()
624 return err; in ubifs_unlink()
641 int err; in check_dir_empty() local
646 err = PTR_ERR(dent); in check_dir_empty()
647 if (err == -ENOENT) in check_dir_empty()
648 err = 0; in check_dir_empty()
651 err = -ENOTEMPTY; in check_dir_empty()
653 return err; in check_dir_empty()
661 int err, budgeted = 1; in ubifs_rmdir() local
675 err = check_dir_empty(c, dentry->d_inode); in ubifs_rmdir()
676 if (err) in ubifs_rmdir()
677 return err; in ubifs_rmdir()
679 err = ubifs_budget_space(c, &req); in ubifs_rmdir()
680 if (err) { in ubifs_rmdir()
681 if (err != -ENOSPC) in ubifs_rmdir()
682 return err; in ubifs_rmdir()
693 err = ubifs_jnl_update(c, dir, &dentry->d_name, inode, 1, 0); in ubifs_rmdir()
694 if (err) in ubifs_rmdir()
716 return err; in ubifs_rmdir()
724 int err, sz_change = CALC_DENT_SIZE(dentry->d_name.len); in ubifs_mkdir() local
735 err = ubifs_budget_space(c, &req); in ubifs_mkdir()
736 if (err) in ubifs_mkdir()
737 return err; in ubifs_mkdir()
741 err = PTR_ERR(inode); in ubifs_mkdir()
752 err = ubifs_jnl_update(c, dir, &dentry->d_name, inode, 0, 0); in ubifs_mkdir()
753 if (err) { in ubifs_mkdir()
754 ubifs_err("cannot create directory, error %d", err); in ubifs_mkdir()
772 return err; in ubifs_mkdir()
784 int err, devlen = 0; in ubifs_mknod() local
807 err = ubifs_budget_space(c, &req); in ubifs_mknod()
808 if (err) { in ubifs_mknod()
810 return err; in ubifs_mknod()
816 err = PTR_ERR(inode); in ubifs_mknod()
830 err = ubifs_jnl_update(c, dir, &dentry->d_name, inode, 0, 0); in ubifs_mknod()
831 if (err) in ubifs_mknod()
848 return err; in ubifs_mknod()
858 int err, len = strlen(symname); in ubifs_symlink() local
875 err = ubifs_budget_space(c, &req); in ubifs_symlink()
876 if (err) in ubifs_symlink()
877 return err; in ubifs_symlink()
881 err = PTR_ERR(inode); in ubifs_symlink()
888 err = -ENOMEM; in ubifs_symlink()
906 err = ubifs_jnl_update(c, dir, &dentry->d_name, inode, 0, 0); in ubifs_symlink()
907 if (err) in ubifs_symlink()
925 return err; in ubifs_symlink()
974 int err, release, sync = 0, move = (new_dir != old_dir); in ubifs_rename() local
1005 err = check_dir_empty(c, new_inode); in ubifs_rename()
1006 if (err) in ubifs_rename()
1007 return err; in ubifs_rename()
1010 err = ubifs_budget_space(c, &req); in ubifs_rename()
1011 if (err) in ubifs_rename()
1012 return err; in ubifs_rename()
1013 err = ubifs_budget_space(c, &ino_req); in ubifs_rename()
1014 if (err) { in ubifs_rename()
1016 return err; in ubifs_rename()
1088 err = ubifs_jnl_rename(c, old_dir, old_dentry, new_dir, new_dentry, in ubifs_rename()
1090 if (err) in ubifs_rename()
1104 err = old_inode->i_sb->s_op->write_inode(old_inode, 1); in ubifs_rename()
1105 return err; in ubifs_rename()
1131 return err; in ubifs_rename()