···88#include <linux/writeback.h>99#include <linux/sysctl.h>1010#include <linux/gfp.h>1111+#include "internal.h"11121213/* A global variable is a bit ugly, but it keeps the code simple */1314int sysctl_drop_caches;
···1818#include <linux/quotaops.h>1919#include <linux/types.h>2020#include <linux/writeback.h>2121+#include "../internal.h"21222223static int check_quotactl_permission(struct super_block *sb, int type, int cmd,2324 qid_t id)
+2-28
fs/super.c
···127127/* Superblock refcounting */128128129129/*130130- * Drop a superblock's refcount. Returns non-zero if the superblock was131131- * destroyed. The caller must hold sb_lock.130130+ * Drop a superblock's refcount. The caller must hold sb_lock.132131 */133133-int __put_super(struct super_block *sb)132132+void __put_super(struct super_block *sb)134133{135135- int ret = 0;136136-137134 if (!--sb->s_count) {138135 list_del_init(&sb->s_list);139136 destroy_super(sb);140140- ret = 1;141137 }142142- return ret;143143-}144144-145145-/*146146- * Drop a superblock's refcount.147147- * Returns non-zero if the superblock is about to be destroyed and148148- * at least is already removed from super_blocks list, so if we are149149- * making a loop through super blocks then we need to restart.150150- * The caller must hold sb_lock.151151- */152152-int __put_super_and_need_restart(struct super_block *sb)153153-{154154- /* check for race with generic_shutdown_super() */155155- if (list_empty(&sb->s_instances)) {156156- /* super block is removed, need to restart... */157157- __put_super(sb);158158- return 1;159159- }160160- /* can't be the last, since s_list is still in use */161161- sb->s_count--;162162- BUG_ON(sb->s_count == 0);163163- return 0;164138}165139166140/**
-3
include/linux/fs.h
···17781778 const struct super_operations *ops, unsigned long,17791779 struct vfsmount *mnt);17801780extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);17811781-int __put_super_and_need_restart(struct super_block *sb);17821782-int __put_super(struct super_block *sb);17831783-void put_super(struct super_block *sb);1784178117851782/* Alas, no aliases. Too much hassle with bringing module.h everywhere */17861783#define fops_get(fops) \