• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/gfs2/

Lines Matching refs:ip

148 	struct gfs2_inode *ip = GFS2_I(inode);
157 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + 1);
191 if (!ip->i_inode.i_nlink)
194 if (ip->i_inode.i_nlink == (u32)-1)
231 error = gfs2_dir_add(dir, &dentry->d_name, ip, IF2DT(inode->i_mode));
235 error = gfs2_change_nlink(ip, +1);
267 * @ip: the inode
275 const struct gfs2_inode *ip)
279 if (IS_IMMUTABLE(&ip->i_inode) || IS_APPEND(&ip->i_inode))
284 ip->i_inode.i_uid != current_fsuid() && !capable(CAP_FOWNER))
294 error = gfs2_dir_check(&dip->i_inode, name, ip);
315 struct gfs2_inode *ip = GFS2_I(dentry->d_inode);
326 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + 1);
328 rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr);
344 error = gfs2_unlink_ok(dip, &dentry->d_name, ip);
356 error = gfs2_change_nlink(ip, -1);
386 struct gfs2_inode *dip = GFS2_I(dir), *ip;
407 ip = ghs[1].gh_gl->gl_object;
409 ip->i_disksize = size;
412 error = gfs2_meta_inode_buffer(ip, &dibh);
415 gfs2_dinode_out(ip, dibh->b_data);
446 struct gfs2_inode *dip = GFS2_I(dir), *ip;
461 ip = ghs[1].gh_gl->gl_object;
463 ip->i_inode.i_nlink = 2;
464 ip->i_disksize = sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode);
465 ip->i_diskflags |= GFS2_DIF_JDATA;
466 ip->i_entries = 2;
468 error = gfs2_meta_inode_buffer(ip, &dibh);
476 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
489 gfs2_dinode_out(ip, di);
515 * @ip: The GFS2 inode of the directory to be removed
517 * Assumes Glocks on dip and ip are held
523 struct gfs2_inode *ip)
528 if (ip->i_entries != 2) {
529 if (gfs2_consist_inode(ip))
530 gfs2_dinode_print(ip);
543 error = gfs2_dir_del(ip, &dotname);
548 error = gfs2_dir_del(ip, &dotname);
553 error = gfs2_change_nlink(ip, -1);
557 error = gfs2_change_nlink(ip, -1);
578 struct gfs2_inode *ip = GFS2_I(dentry->d_inode);
588 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + 1);
590 rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr);
605 error = gfs2_unlink_ok(dip, &dentry->d_name, ip);
609 if (ip->i_entries < 2) {
610 if (gfs2_consist_inode(ip))
611 gfs2_dinode_print(ip);
615 if (ip->i_entries > 2) {
624 error = gfs2_rmdiri(dip, &dentry->d_name, ip);
744 struct gfs2_inode *ip = GFS2_I(odentry->d_inode);
757 if (ip == nip)
768 if (S_ISDIR(ip->i_inode.i_mode)) {
771 error = gfs2_ok_to_move(ip, ndip);
783 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + num_gh);
806 error = gfs2_unlink_ok(odip, &odentry->d_name, ip);
854 if (S_ISDIR(ip->i_inode.i_mode) &&
933 error = gfs2_dir_mvino(ip, &name, ndip, DT_DIR);
938 error = gfs2_meta_inode_buffer(ip, &dibh);
941 ip->i_inode.i_ctime = CURRENT_TIME;
942 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
943 gfs2_dinode_out(ip, dibh->b_data);
951 error = gfs2_dir_add(ndir, &ndentry->d_name, ip, IF2DT(ip->i_inode.i_mode));
990 struct gfs2_inode *ip = GFS2_I(dentry->d_inode);
997 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &i_gh);
1005 if (!ip->i_disksize) {
1006 gfs2_consist_inode(ip);
1011 error = gfs2_meta_inode_buffer(ip, &dibh);
1017 x = ip->i_disksize + 1;
1052 struct gfs2_inode *ip = GFS2_I(inode);
1057 if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) {
1058 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
1076 struct gfs2_inode *ip = GFS2_I(inode);
1080 if (attr->ia_size != ip->i_disksize) {
1088 error = gfs2_truncatei(ip, attr->ia_size);
1089 if (error && (inode->i_size != ip->i_disksize))
1090 i_size_write(inode, ip->i_disksize);
1097 struct gfs2_inode *ip = GFS2_I(inode);
1113 if (!gfs2_alloc_get(ip))
1116 error = gfs2_quota_lock(ip, nuid, ngid);
1121 error = gfs2_quota_check(ip, nuid, ngid);
1130 error = gfs2_meta_inode_buffer(ip, &dibh);
1145 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
1146 gfs2_dinode_out(ip, dibh->b_data);
1150 u64 blocks = gfs2_get_inode_blocks(&ip->i_inode);
1151 gfs2_quota_change(ip, -blocks, ouid, ogid);
1152 gfs2_quota_change(ip, blocks, nuid, ngid);
1158 gfs2_quota_unlock(ip);
1160 gfs2_alloc_put(ip);
1178 struct gfs2_inode *ip = GFS2_I(inode);
1182 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &i_gh);
1199 error = gfs2_acl_chmod(ip, attr);
1201 error = gfs2_setattr_simple(ip, attr);
1229 struct gfs2_inode *ip = GFS2_I(inode);
1234 if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) {
1235 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
1252 struct gfs2_inode *ip = GFS2_I(inode);
1256 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
1270 struct gfs2_inode *ip = GFS2_I(inode);
1274 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
1287 struct gfs2_inode *ip = GFS2_I(inode);
1291 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
1304 struct gfs2_inode *ip = GFS2_I(inode);
1314 ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
1318 if (gfs2_is_stuffed(ip)) {
1319 u64 phys = ip->i_no_addr << inode->i_blkbits;