]> Pileus Git - ~andy/linux/blobdiff - fs/cifs/dir.c
cifs: Fix incorrect return code being printed in cFYI messages
[~andy/linux] / fs / cifs / dir.c
index 3758965d73d56c8b281a3ea055b2eb27eed3892d..7dc6b74f9deffc31de7fe5ea122eb0945b564927 100644 (file)
@@ -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)
@@ -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,