]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 27 Jul 2008 23:47:55 +0000 (16:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 27 Jul 2008 23:47:55 +0000 (16:47 -0700)
* 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  NFS: Ensure we call nfs_sb_deactive() after releasing the directory inode
  nfs_remount oops when rebooting + possible fix

fs/nfs/super.c
fs/nfs/unlink.c

index 1b94e3650f5cb343d241d372d0d03d85ed42528d..9abcd2b329f7357b0af65065613e996b643e1747 100644 (file)
@@ -1718,9 +1718,9 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
         * ones were explicitly specified. Fall back to legacy behavior and
         * just return success.
         */
-       if ((nfsvers == 4 && options4->version == 1) ||
-           (nfsvers <= 3 && options->version >= 1 &&
-            options->version <= 6))
+       if ((nfsvers == 4 && (!options4 || options4->version == 1)) ||
+           (nfsvers <= 3 && (!options || (options->version >= 1 &&
+                                          options->version <= 6))))
                return 0;
 
        data = kzalloc(sizeof(*data), GFP_KERNEL);
index 3adf8b266461fbf3562d7876ed57f50de2f974df..f089e5839d7deefe50bc351f98eff7d45fdfd453 100644 (file)
@@ -95,10 +95,11 @@ static void nfs_async_unlink_done(struct rpc_task *task, void *calldata)
 static void nfs_async_unlink_release(void *calldata)
 {
        struct nfs_unlinkdata   *data = calldata;
+       struct super_block *sb = data->dir->i_sb;
 
        nfs_dec_sillycount(data->dir);
-       nfs_sb_deactive(NFS_SERVER(data->dir));
        nfs_free_unlinkdata(data);
+       nfs_sb_deactive(NFS_SB(sb));
 }
 
 static const struct rpc_call_ops nfs_unlink_ops = {