Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154375
b: refs/heads/master
c: 0f3bc09
h: refs/heads/master
i:
  154373: 842ca2d
  154371: 6331763
  154367: 07a4023
v: v3
  • Loading branch information
Suresh Jayaraman authored and Steve French committed Jun 25, 2009
1 parent 3c94d43 commit 5a6dd7a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f46c7234e472ceee39afea4fb5a4365843e1850a
refs/heads/master: 0f3bc09ee1b7fcadd5bfdc5ed2e1643f658fe23d
6 changes: 4 additions & 2 deletions trunk/fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,9 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,

full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}

if (oplockEnabled)
Expand Down Expand Up @@ -540,8 +541,9 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL);
if (buf == NULL) {
kfree(full_path);
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}

rc = CIFSSMBOpen(xid, pTcon, full_path,
Expand Down
24 changes: 16 additions & 8 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,16 @@ int cifs_open(struct inode *inode, struct file *file)
pCifsInode = CIFS_I(file->f_path.dentry->d_inode);
pCifsFile = cifs_fill_filedata(file);
if (pCifsFile) {
rc = 0;
FreeXid(xid);
return 0;
return rc;
}

full_path = build_path_from_dentry(file->f_path.dentry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}

cFYI(1, ("inode = 0x%p file flags are 0x%x for %s",
Expand Down Expand Up @@ -494,8 +496,9 @@ static int cifs_reopen_file(struct file *file, bool can_flush)
mutex_unlock(&pCifsFile->fh_mutex);
if (!pCifsFile->invalidHandle) {
mutex_lock(&pCifsFile->fh_mutex);
rc = 0;
FreeXid(xid);
return 0;
return rc;
}

if (file->f_path.dentry == NULL) {
Expand Down Expand Up @@ -845,8 +848,9 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
tcon = cifs_sb->tcon;

if (file->private_data == NULL) {
rc = -EBADF;
FreeXid(xid);
return -EBADF;
return rc;
}
netfid = ((struct cifsFileInfo *)file->private_data)->netfid;

Expand Down Expand Up @@ -1805,8 +1809,9 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data,
pTcon = cifs_sb->tcon;

if (file->private_data == NULL) {
rc = -EBADF;
FreeXid(xid);
return -EBADF;
return rc;
}
open_file = (struct cifsFileInfo *)file->private_data;

Expand Down Expand Up @@ -1885,8 +1890,9 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size,
pTcon = cifs_sb->tcon;

if (file->private_data == NULL) {
rc = -EBADF;
FreeXid(xid);
return -EBADF;
return rc;
}
open_file = (struct cifsFileInfo *)file->private_data;

Expand Down Expand Up @@ -2019,8 +2025,9 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,

xid = GetXid();
if (file->private_data == NULL) {
rc = -EBADF;
FreeXid(xid);
return -EBADF;
return rc;
}
open_file = (struct cifsFileInfo *)file->private_data;
cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
Expand Down Expand Up @@ -2185,8 +2192,9 @@ static int cifs_readpage(struct file *file, struct page *page)
xid = GetXid();

if (file->private_data == NULL) {
rc = -EBADF;
FreeXid(xid);
return -EBADF;
return rc;
}

cFYI(1, ("readpage %p at offset %d 0x%x\n",
Expand Down
15 changes: 10 additions & 5 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,9 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry)
* sb->s_vfs_rename_mutex here */
full_path = build_path_from_dentry(dentry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}

if ((tcon->ses->capabilities & CAP_UNIX) &&
Expand Down Expand Up @@ -1118,8 +1119,9 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)

full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}

if ((pTcon->ses->capabilities & CAP_UNIX) &&
Expand Down Expand Up @@ -1303,8 +1305,9 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)

full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}

rc = CIFSSMBRmDir(xid, pTcon, full_path, cifs_sb->local_nls,
Expand Down Expand Up @@ -1508,8 +1511,9 @@ int cifs_revalidate(struct dentry *direntry)
since that would deadlock */
full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}
cFYI(1, ("Revalidate: %s inode 0x%p count %d dentry: 0x%p d_time %ld "
"jiffies %ld", full_path, direntry->d_inode,
Expand Down Expand Up @@ -1911,8 +1915,9 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)

full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}

/*
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/cifs/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
full_path = build_path_from_dentry(direntry);

if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}

cFYI(1, ("Full path: %s", full_path));
Expand Down
12 changes: 8 additions & 4 deletions trunk/fs/cifs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)

full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}
if (ea_name == NULL) {
cFYI(1, ("Null xattr names not supported"));
Expand Down Expand Up @@ -118,8 +119,9 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,

full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}
/* return dos attributes as pseudo xattr */
/* return alt name if available as pseudo attr */
Expand Down Expand Up @@ -225,8 +227,9 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,

full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}
/* return dos attributes as pseudo xattr */
/* return alt name if available as pseudo attr */
Expand Down Expand Up @@ -351,8 +354,9 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size)

full_path = build_path_from_dentry(direntry);
if (full_path == NULL) {
rc = -ENOMEM;
FreeXid(xid);
return -ENOMEM;
return rc;
}
/* return dos attributes as pseudo xattr */
/* return alt name if available as pseudo attr */
Expand Down

0 comments on commit 5a6dd7a

Please sign in to comment.