Skip to content

Commit

Permalink
9p: remove unneeded checks
Browse files Browse the repository at this point in the history
git_t is unsigned an can never be less than zero.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
Dan Carpenter authored and Eric Van Hensbergen committed Oct 28, 2010
1 parent 8128057 commit 57ee047
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,10 +886,6 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir, struct dentry *dentry,
}

gid = v9fs_get_fsgid_for_create(dir);
if (gid < 0) {
P9_DPRINTK(P9_DEBUG_VFS, "v9fs_get_fsgid_for_create failed\n");
goto error;
}

name = (char *) dentry->d_name.name;
err = p9_client_mkdir_dotl(dfid, name, mode, gid, &qid);
Expand Down Expand Up @@ -1616,11 +1612,6 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry,

gid = v9fs_get_fsgid_for_create(dir);

if (gid < 0) {
P9_DPRINTK(P9_DEBUG_VFS, "v9fs_get_egid failed %d\n", gid);
goto error;
}

/* Server doesn't alter fid on TSYMLINK. Hence no need to clone it. */
err = p9_client_symlink(dfid, name, (char *)symname, gid, &qid);

Expand Down Expand Up @@ -1885,10 +1876,6 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int mode,
}

gid = v9fs_get_fsgid_for_create(dir);
if (gid < 0) {
P9_DPRINTK(P9_DEBUG_VFS, "v9fs_get_fsgid_for_create failed\n");
goto error;
}

name = (char *) dentry->d_name.name;

Expand Down

0 comments on commit 57ee047

Please sign in to comment.